Some checks failed
build-images / web (push) Has been cancelled
vision2026-ci / Python SDK resource tests (push) Has been cancelled
build-images / api (push) Has been cancelled
build-images / worker-gpu (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Has been cancelled
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Has been cancelled
codeql / Analyze (javascript-typescript) (push) Has been cancelled
codeql / Analyze (python) (push) Has been cancelled
perf / API hot-path micro-smoke (budgeted) (push) Has been cancelled
perf / Desktop engine crates (release build check) (push) Has been cancelled
vision2026-ci / API phase modules (ruff + pytest) (push) Has been cancelled
vision2026-ci / Alembic upgrade + drift check (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Has been cancelled
Paid, hosted product at menivor.com, now retired as a company project. Fresh squashed history of the cleaned working tree (secret-scanned, no .env, no customer data, no outreach logs). Built on MoneyPrinterTurbo (MIT, harry0703) — see NOTICE.
52 lines
1.8 KiB
HCL
52 lines
1.8 KiB
HCL
# Managed Kubernetes cluster — a CPU node pool for the API/beat and a GPU node
|
|
# pool (autoscaling, scale-to-zero) for the render workers. Provider-agnostic
|
|
# shape (variables drive the concrete GKE/EKS resource in a provider overlay);
|
|
# here modeled against a generic managed-cluster provider.
|
|
terraform {
|
|
required_providers {
|
|
# Swap for google/aws in the concrete env; kept generic for the module shape.
|
|
kubernetes = { source = "hashicorp/kubernetes", version = "~> 2.30" }
|
|
}
|
|
}
|
|
|
|
variable "cluster_name" { type = string }
|
|
variable "region" { type = string }
|
|
variable "cpu_pool" {
|
|
type = object({ machine = string, min = number, max = number })
|
|
default = { machine = "e2-standard-4", min = 2, max = 6 }
|
|
}
|
|
variable "gpu_pool" {
|
|
type = object({ machine = string, gpu = string, min = number, max = number })
|
|
default = { machine = "g2-standard-8", gpu = "nvidia-l4", min = 0, max = 20 }
|
|
}
|
|
|
|
# Namespaces the workloads deploy into (created by this module so overlays can
|
|
# assume they exist).
|
|
resource "kubernetes_namespace" "reelforge" {
|
|
metadata { name = "reelforge" }
|
|
}
|
|
|
|
resource "kubernetes_namespace" "reelforge_gpu" {
|
|
metadata {
|
|
name = "reelforge-gpu"
|
|
labels = { "nvidia.com/gpu.present" = "true" }
|
|
}
|
|
}
|
|
|
|
# ResourceQuota caps the GPU namespace so a runaway autoscaler can't exceed the
|
|
# GPU pool ceiling (defense-in-depth alongside the costguard controller).
|
|
resource "kubernetes_resource_quota" "gpu" {
|
|
metadata {
|
|
name = "gpu-quota"
|
|
namespace = kubernetes_namespace.reelforge_gpu.metadata[0].name
|
|
}
|
|
spec {
|
|
hard = {
|
|
"requests.nvidia.com/gpu" = tostring(var.gpu_pool.max)
|
|
}
|
|
}
|
|
}
|
|
|
|
output "namespace" { value = kubernetes_namespace.reelforge.metadata[0].name }
|
|
output "gpu_namespace" { value = kubernetes_namespace.reelforge_gpu.metadata[0].name }
|