forgot the pvc part

This commit is contained in:
pierre.geeraert
2026-10-12 18:08:07 +01:00
parent 9a5e82cb32
commit fdba5cea6b
+6 -7
View File
@@ -67,7 +67,7 @@ resource "kubernetes_deployment_v1" "database-automatic" {
volume_mount {
mount_path = try(each.value.database.mountPath, "/var/lib/postgresql/")
name = "${each.key}-db-pvc"
name = "${each.key}-db-volume"
}
dynamic "volume_mount" {
@@ -106,7 +106,6 @@ resource "kubernetes_deployment_v1" "database-automatic" {
content {
name = env.value.value_from.secret_key_ref.name
key = env.value.value_from.secret_key_ref.key
# optional = true
}
}
}
@@ -120,9 +119,9 @@ resource "kubernetes_deployment_v1" "database-automatic" {
volume {
name = "${each.key}-db-pvc"
persistent_volume_claim {
claim_name = "${each.key}-db-pvc"
name = "${each.key}-db-volume"
host_path {
path = try(each.value.database.host_path, join("/", [var.storage_path.main_storage, coalesce(each.value.namespace, each.value.connected_namespace, each.key), join("-", [each.key, "db"])]))
}
}
@@ -131,8 +130,8 @@ resource "kubernetes_deployment_v1" "database-automatic" {
content {
name = "${each.key}-db-backup"
persistent_volume_claim {
claim_name = "${each.key}-db-backup"
host_path {
path = join("/", [var.storage_path.fast_access,"Backup", coalesce(each.value.namespace, each.value.connected_namespace, each.key), "${each.key}-db-backup"])
}
}
}