summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2021-03-03 19:51:37 +0000
committerGerrit Code Review <gerrit@onap.org>2021-03-03 19:51:37 +0000
commita380f597fc80fee083ce2d8bf2ca408a660fba1b (patch)
tree1832f84895e5b30d2a0f2d7bf212a333dbc2654a
parentf46b67ceca21bfd573ec924494b8b9651430f06e (diff)
parent0a2291b2872028a6ef7b5e9e4cd0c07f4b40f793 (diff)
Merge "[GENERAL] Allow different port for svc and pod"
-rw-r--r--kubernetes/common/common/templates/_pod.tpl7
1 files changed, 3 insertions, 4 deletions
diff --git a/kubernetes/common/common/templates/_pod.tpl b/kubernetes/common/common/templates/_pod.tpl
index de2548562d..b38a7f1105 100644
--- a/kubernetes/common/common/templates/_pod.tpl
+++ b/kubernetes/common/common/templates/_pod.tpl
@@ -36,13 +36,13 @@
{{- $global := . }}
{{- range $index, $port := $ports }}
{{- if (include "common.needTLS" $global) }}
-- containerPort: {{ $port.port }}
+- containerPort: {{ default $port.port $port.internal_port }}
{{- else }}
-- containerPort: {{ default $port.port $port.plain_port }}
+- containerPort: {{ default (default $port.port $port.internal_port) (default $port.plain_port $port.internal_plain_port) }}
{{- end }}
name: {{ $port.name }}
{{- if (and $port.plain_port (and (include "common.needTLS" $global) $both_tls_and_plain)) }}
-- containerPort: {{ $port.plain_port }}
+- containerPort: {{ default $port.plain_port $port.internal_plain_port }}
name: {{ $port.name }}-plain
{{- end }}
{{- end }}
@@ -67,4 +67,3 @@ securityContext:
privileged: false
allowPrivilegeEscalation: false
{{- end }}
-