gitea needed service port

This commit is contained in:
pi-ux-ce
2026-10-12 10:25:47 +01:00
parent 534958f828
commit 7962e91e3a
3 changed files with 3 additions and 35 deletions
-11
View File
@@ -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 : {}
-23
View File
@@ -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 {
+3 -1
View File
@@ -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" }