2021-10-31 12:36:53 +00:00
|
|
|
|
|
|
|
|
|
2021-10-28 18:15:01 +00:00
|
|
|
resource "linode_lke_cluster" "stg-video-cluster" {
|
|
|
|
|
label = "stg-video-cluster"
|
2025-11-11 21:40:01 +00:00
|
|
|
k8s_version = "1.32"
|
2021-07-13 17:06:50 +00:00
|
|
|
region = "us-central"
|
|
|
|
|
tags = ["staging"]
|
2021-06-25 16:26:10 +00:00
|
|
|
|
2021-07-13 17:06:50 +00:00
|
|
|
pool {
|
|
|
|
|
type = "g6-standard-2"
|
2025-10-05 22:43:16 +00:00
|
|
|
count = 3
|
|
|
|
|
labels = {
|
2026-01-06 12:04:29 +00:00
|
|
|
"workload" = "media"
|
|
|
|
|
}
|
|
|
|
|
taint {
|
|
|
|
|
key = "dedicated"
|
|
|
|
|
value = "media"
|
|
|
|
|
effect = "NoSchedule"
|
2025-10-05 22:43:16 +00:00
|
|
|
}
|
2021-11-15 16:10:29 +00:00
|
|
|
autoscaler {
|
|
|
|
|
min = 3
|
|
|
|
|
max = 10
|
|
|
|
|
}
|
2021-07-13 17:06:50 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-06 12:04:29 +00:00
|
|
|
pool {
|
|
|
|
|
type = "g6-standard-1"
|
|
|
|
|
count = 2
|
|
|
|
|
labels = {
|
|
|
|
|
"workload" = "infra"
|
|
|
|
|
}
|
|
|
|
|
autoscaler {
|
|
|
|
|
min = 2
|
|
|
|
|
max = 5
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-13 17:06:50 +00:00
|
|
|
}
|
2021-07-16 15:15:34 +00:00
|
|
|
|
2021-10-31 12:36:53 +00:00
|
|
|
resource "local_file" "kubeconfig" {
|
|
|
|
|
filename = "stg-kubeconfig.yaml"
|
|
|
|
|
content = base64decode(linode_lke_cluster.stg-video-cluster.kubeconfig)
|
2021-10-30 14:04:16 +00:00
|
|
|
}
|
2021-10-29 17:59:36 +00:00
|
|
|
|
2021-10-31 12:36:53 +00:00
|
|
|
provider "kubernetes" {
|
|
|
|
|
config_path = local_file.kubeconfig.filename
|
2021-11-18 15:57:31 +00:00
|
|
|
alias = "staging"
|
2021-10-29 17:59:36 +00:00
|
|
|
}
|
|
|
|
|
|
2021-08-30 18:21:19 +00:00
|
|
|
resource "linode_lke_cluster" "prd-video-cluster" {
|
|
|
|
|
label = "prd-video-cluster"
|
2025-11-11 21:40:01 +00:00
|
|
|
k8s_version = "1.32"
|
2021-08-30 18:21:19 +00:00
|
|
|
region = "us-central"
|
|
|
|
|
tags = ["production"]
|
|
|
|
|
|
|
|
|
|
pool {
|
|
|
|
|
type = "g6-standard-2"
|
|
|
|
|
count = 3
|
2025-10-05 22:43:16 +00:00
|
|
|
labels = {
|
|
|
|
|
workload = "infra"
|
|
|
|
|
}
|
2021-08-30 18:21:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# WebRTC-BE pool
|
|
|
|
|
pool {
|
|
|
|
|
type = "g6-standard-2"
|
|
|
|
|
count = 3
|
2025-10-05 22:43:16 +00:00
|
|
|
labels = {
|
|
|
|
|
workload = "app"
|
|
|
|
|
}
|
2021-08-30 18:21:19 +00:00
|
|
|
}
|
|
|
|
|
# Coturn pool
|
|
|
|
|
pool {
|
|
|
|
|
type = "g6-standard-2"
|
|
|
|
|
count = 3
|
2025-10-05 22:43:16 +00:00
|
|
|
labels = {
|
|
|
|
|
workload = "media"
|
|
|
|
|
}
|
2021-08-30 18:21:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-18 15:57:31 +00:00
|
|
|
resource "local_file" "kubeconfig_prd" {
|
|
|
|
|
filename = "prd-kubeconfig.yaml"
|
|
|
|
|
content = base64decode(linode_lke_cluster.prd-video-cluster.kubeconfig)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
provider "kubernetes" {
|
|
|
|
|
config_path = local_file.kubeconfig_prd.filename
|
|
|
|
|
alias = "production"
|
|
|
|
|
}
|