diff --git a/core/database.tf b/core/database.tf index 4ab3a74..c800c6a 100644 --- a/core/database.tf +++ b/core/database.tf @@ -57,17 +57,6 @@ resource "kubernetes_deployment_v1" "database-automatic" { command = try([each.value.database.command], []) args = each.value.database_args != null ? each.value.database_args : [] - dynamic "env_from" { - for_each = each.value.database != null && each.value.enabled == true && !(try(each.value.database.shunt, false)) ? ["${each.key}-db-terraform"] : [] - content { - dynamic "secret_ref" { - for_each = [1] - content { - name = env_from.value - } - } - } - } dynamic "env" { for_each = each.value.environment != null ? each.value.environment : {} diff --git a/core/deployment.tf b/core/deployment.tf index 943c6b2..09506ce 100644 --- a/core/deployment.tf +++ b/core/deployment.tf @@ -71,29 +71,6 @@ resource "kubernetes_deployment_v1" "automatic" { } } - dynamic "env_from" { - for_each = each.value.database != null && each.value.enabled == true && !(try(each.value.database.shunt, false)) ? ["${each.key}-db-terraform"] : [] - #for_each = each.value.database != null && each.value.enabled == true ? ["${each.key}-db-terraform"] : [] - content { - dynamic "secret_ref" { - for_each = [1] - content { - name = env_from.value - } - } - } - } - dynamic "env_from" { - for_each = each.value.database != null && each.value.enabled == true ? ["${each.key}-db-mapped-terraform"] : [] - content { - dynamic "secret_ref" { - for_each = [1] - content { - name = env_from.value - } - } - } - } dynamic "env_from" { for_each = each.value.config_map_ref != null ? each.value.config_map_ref : [] content { diff --git a/core/variables.auto.tfvars b/core/variables.auto.tfvars index ea233b1..f87b699 100644 --- a/core/variables.auto.tfvars +++ b/core/variables.auto.tfvars @@ -40,6 +40,7 @@ kubernetes = { #enabled = false #docker = true image = "gitea/gitea:1.27.0" + service_port = [3000] # no service_port: nginx reaches http://gitea:3000 over deployment_network database = { image = "postgres:17" @@ -53,7 +54,8 @@ kubernetes = { POSTGRES_DB = { value = "gitea-database" } GITEA__database__DB_TYPE = { value = "postgres" } - GITEA__database__HOST = { value = "gitea-db:5432" } + #GITEA__database__HOST = { value = "gitea-db:5432" } # for docker + GITEA__database__HOST = { value = "gitea-db-svc:5432" } # for k8s GITEA__database__USER = { value = "gitea-KY56Q" } GITEA__database__PASSWD = { value = "Modulator-Yearning-Gills3" } GITEA__database__NAME = { value = "gitea-database" }