multiport + naming

This commit is contained in:
2025-05-18 00:29:58 +01:00
parent a53852b0c6
commit 3ff155e3e6
2 changed files with 31 additions and 14 deletions
+3 -1
View File
@@ -210,6 +210,7 @@ resource "kubernetes_service" "automatic_service" {
content {
port = port.value
target_port = port.value
name = replace("${each.key}${port.value}", "/(.{0,15})(.*)/", "$1")
}
}
@@ -310,7 +311,8 @@ resource "kubernetes_deployment_v1" "automatic" {
for_each = each.value.service_port != null ? each.value.service_port : []
content {
container_port = port.value
name = "${each.key}-${port.value}"
# name = "${each.key}-${port.value}"
name = replace("${each.key}${port.value}", "/(.{0,15})(.*)/", "$1")
}
}