adding database support
This commit is contained in:
+4
-5
@@ -43,7 +43,7 @@ resource "kubernetes_deployment_v1" "database-automatic" {
|
|||||||
|
|
||||||
volume_mount {
|
volume_mount {
|
||||||
mount_path = try(each.value.database.mountPath, "/var/lib/postgresql/")
|
mount_path = try(each.value.database.mountPath, "/var/lib/postgresql/")
|
||||||
name = "${each.key}-db-pvc"
|
name = "${each.key}-db-volume"
|
||||||
}
|
}
|
||||||
|
|
||||||
dynamic "volume_mount" {
|
dynamic "volume_mount" {
|
||||||
@@ -82,7 +82,6 @@ resource "kubernetes_deployment_v1" "database-automatic" {
|
|||||||
content {
|
content {
|
||||||
name = env.value.value_from.secret_key_ref.name
|
name = env.value.value_from.secret_key_ref.name
|
||||||
key = env.value.value_from.secret_key_ref.key
|
key = env.value.value_from.secret_key_ref.key
|
||||||
# optional = true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -96,9 +95,9 @@ resource "kubernetes_deployment_v1" "database-automatic" {
|
|||||||
|
|
||||||
|
|
||||||
volume {
|
volume {
|
||||||
name = "${each.key}-db-pvc"
|
name = "${each.key}-db-volume"
|
||||||
persistent_volume_claim {
|
host_path {
|
||||||
claim_name = "${each.key}-db-pvc"
|
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"])]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ kubernetes = {
|
|||||||
|
|
||||||
|
|
||||||
gitea = {
|
gitea = {
|
||||||
enabled = false
|
#enabled = false
|
||||||
#docker = true
|
#docker = true
|
||||||
image = "gitea/gitea:1.27.0"
|
image = "gitea/gitea:1.27.0"
|
||||||
# no service_port: nginx reaches http://gitea:3000 over deployment_network
|
# no service_port: nginx reaches http://gitea:3000 over deployment_network
|
||||||
|
|||||||
Reference in New Issue
Block a user