From bf812cce4cdf63b7ba083744650b3c351a2b0d6e Mon Sep 17 00:00:00 2001 From: shockrah Date: Sun, 8 Dec 2024 18:28:34 -0800 Subject: [PATCH] Adding variable structure for the new game_server config --- infra/vultr-kubernetes/variables.tf | 16 ++++++++++++++-- infra/vultr-kubernetes/variables.tfvars | 13 +++++++++++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/infra/vultr-kubernetes/variables.tf b/infra/vultr-kubernetes/variables.tf index 50c2fea..0e1ba9a 100644 --- a/infra/vultr-kubernetes/variables.tf +++ b/infra/vultr-kubernetes/variables.tf @@ -34,6 +34,18 @@ variable cluster { }) } -variable lab_domain { - type = string +variable game_servers { + type = object({ + namespace = string + configs = map(object({ + name = optional(string) + image = string + cpu = string + mem = string + port = number + proto = optional(string) + }) + ) + }) } + diff --git a/infra/vultr-kubernetes/variables.tfvars b/infra/vultr-kubernetes/variables.tfvars index edda644..f42af49 100644 --- a/infra/vultr-kubernetes/variables.tfvars +++ b/infra/vultr-kubernetes/variables.tfvars @@ -1,4 +1,3 @@ - cluster = { region = "lax" label = "athens-cluster" @@ -11,4 +10,14 @@ cluster = { } } -lab_domain = "temprah-lab.xyz" +game_servers = { + namespace = "games" + configs = { + nginx = { + image = "nginx:latest" + cpu = "200m" + mem = "64Mi" + port = 30808 + } + } +} \ No newline at end of file