remove image automatic and add naming
This commit is contained in:
@@ -334,6 +334,7 @@ resource "kubernetes_deployment_v1" "database-automatic" {
|
||||
labels = {
|
||||
app = each.key
|
||||
deployment_method = "Terraform"
|
||||
database = "true"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,19 +352,19 @@ resource "kubernetes_deployment_v1" "database-automatic" {
|
||||
labels = {
|
||||
app = each.key
|
||||
deployment_method = "Terraform"
|
||||
database = "true"
|
||||
}
|
||||
}
|
||||
|
||||
spec {
|
||||
container {
|
||||
image = each.value.image
|
||||
name = coalesce(each.value.name, each.key)
|
||||
dynamic "port" {
|
||||
for_each = each.value.service_port != null ? [""] : []
|
||||
content {
|
||||
container_port = each.value.service_port
|
||||
name = each.key
|
||||
}
|
||||
image = "docker.io/library/postgres:14"
|
||||
name = "${coalesce(each.value.name, each.key)}-db"
|
||||
port {
|
||||
|
||||
container_port = 5432
|
||||
name = 5432
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user