multiport + naming
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user