From e9b739acdabbe40420356033825b676b0bae4f7e Mon Sep 17 00:00:00 2001 From: anatoleam Date: Fri, 1 Dec 2023 02:26:35 -0600 Subject: [PATCH] deployment: fix config format --- terraform/config.template.yaml | 3 --- terraform/deployment.tf | 19 +++++++++---------- 2 files changed, 9 insertions(+), 13 deletions(-) delete mode 100644 terraform/config.template.yaml diff --git a/terraform/config.template.yaml b/terraform/config.template.yaml deleted file mode 100644 index f4d4303a..00000000 --- a/terraform/config.template.yaml +++ /dev/null @@ -1,3 +0,0 @@ -GQL_API_URL: ${gql_api_url} -WEBSITE_URL: ${website_url} -WEBSITE_BIND: "0.0.0.0:3000" diff --git a/terraform/deployment.tf b/terraform/deployment.tf index 36be6370..0a91bd9e 100644 --- a/terraform/deployment.tf +++ b/terraform/deployment.tf @@ -11,10 +11,9 @@ resource "kubernetes_secret" "app" { } data = { - "config.yaml" = templatefile("${path.module}/config.template.yaml", { - website_url = "https://${local.infra.primary_zone}" - gql_api_url = "https://${local.infra.secondary_zone}/v3/gql" - }) + WEBSITE_URL = "https://${local.infra.primary_zone}" + GQL_API_URL = "http://api:3000/v3/gql" + WEBSITE_BIND : "0.0.0.0:3000" } } @@ -62,12 +61,6 @@ resource "kubernetes_deployment" "app" { protocol = "TCP" } - env_from { - secret_ref { - name = kubernetes_secret.app.metadata[0].name - } - } - resources { requests = { cpu = "10m" @@ -79,6 +72,12 @@ resource "kubernetes_deployment" "app" { } } + env_from { + secret_ref { + name = kubernetes_secret.app.metadata[0].name + } + } + liveness_probe { http_get { port = "http"