caelum0x d56639a594
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
Menivor — open source release (MIT), free to use and fork
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.
2026-12-04 02:10:26 +03:00

80 lines
2.3 KiB
HCL

# GKE provider implementation of the ReelForge cluster shape (main.tf): a
# regional cluster with a CPU node pool (API/beat) and an autoscaling GPU node
# pool (render workers) that scales to zero. Enable by setting `provider = "gke"`.
# The generic namespaces/quota in main.tf apply on top of this cluster.
variable "provider_kind" {
type = string
default = "generic" # generic | gke | eks
}
# --- GKE resources (created only when provider_kind == "gke") ----------------
resource "google_container_cluster" "this" {
count = var.provider_kind == "gke" ? 1 : 0
name = var.cluster_name
location = var.region
remove_default_node_pool = true
initial_node_count = 1
networking_mode = "VPC_NATIVE"
release_channel { channel = "REGULAR" }
workload_identity_config { workload_pool = "${var.cluster_name}.svc.id.goog" }
}
resource "google_container_node_pool" "cpu" {
count = var.provider_kind == "gke" ? 1 : 0
name = "cpu"
cluster = google_container_cluster.this[0].id
node_count = null
autoscaling {
min_node_count = var.cpu_pool.min
max_node_count = var.cpu_pool.max
}
node_config {
machine_type = var.cpu_pool.machine
oauth_scopes = ["https://www.googleapis.com/auth/cloud-platform"]
workload_metadata_config { mode = "GKE_METADATA" }
}
management {
auto_repair = true
auto_upgrade = true
}
}
resource "google_container_node_pool" "gpu" {
count = var.provider_kind == "gke" ? 1 : 0
name = "gpu"
cluster = google_container_cluster.this[0].id
autoscaling {
min_node_count = var.gpu_pool.min # 0 => scale to zero when idle
max_node_count = var.gpu_pool.max
}
node_config {
machine_type = var.gpu_pool.machine
guest_accelerator {
type = var.gpu_pool.gpu
count = 1
}
# Taint so only GPU-tolerating render workers schedule here.
taint {
key = "nvidia.com/gpu"
value = "present"
effect = "NO_SCHEDULE"
}
labels = { "nvidia.com/gpu.present" = "true" }
oauth_scopes = ["https://www.googleapis.com/auth/cloud-platform"]
}
management {
auto_repair = true
auto_upgrade = true
}
}
output "gke_endpoint" {
value = var.provider_kind == "gke" ? google_container_cluster.this[0].endpoint : ""
sensitive = true
}