aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
authorAndreas Geissler <andreas-geissler@telekom.de>2023-02-05 14:44:05 +0100
committerAndreas Geissler <andreas-geissler@telekom.de>2023-02-06 09:55:16 +0100
commitbc4ccb78259dfeb32d412d017f5ab7c2db8452d9 (patch)
treed026c38d59aa12a7d9430d46a14a89902c7b5dd5 /kubernetes
parent89ea60c8a96163039700de3b4e641c59bba49ca9 (diff)
[COMMON] Fix nodePort creation in _service.tpl
In case of non-TLS service the nodePort was not reserved and missed to disable tls for the services (tlsEnabled) Issue-ID: OOM-3094 Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de> Change-Id: I7f5102a499f4b262556787b5db682e28a9ebcf81
Diffstat (limited to 'kubernetes')
-rw-r--r--kubernetes/common/common/templates/_service.tpl12
-rwxr-xr-xkubernetes/onap/values.yaml2
2 files changed, 7 insertions, 7 deletions
diff --git a/kubernetes/common/common/templates/_service.tpl b/kubernetes/common/common/templates/_service.tpl
index 7b88af02aa..20d2ebe260 100644
--- a/kubernetes/common/common/templates/_service.tpl
+++ b/kubernetes/common/common/templates/_service.tpl
@@ -131,9 +131,6 @@ labels: {{- include "common.labels" (dict "labels" $labels "dot" $dot) | nindent
{{- else }}
name: {{ $port.name }}
{{- end }}
-{{- if (eq $serviceType "NodePort") }}
- nodePort: {{ include "common.nodePortPrefix" (dict "dot" $dot "useNodePortExt" $port.useNodePortExt) }}{{ $port.nodePort }}
-{{- end }}
{{- else }}
- port: {{ default $port.port $port.plain_port }}
targetPort: {{ $port.name }}
@@ -148,15 +145,18 @@ labels: {{- include "common.labels" (dict "labels" $labels "dot" $dot) | nindent
name: {{ $port.name }}
{{- end }}
{{- end }}
+{{- if (eq $serviceType "NodePort") }}
+ nodePort: {{ include "common.nodePortPrefix" (dict "dot" $dot "useNodePortExt" $port.useNodePortExt) }}{{ $port.nodePort }}
+{{- end }}
{{- if (and (and (include "common.needTLS" $dot) $add_plain_port) $port.plain_port) }}
{{- if (eq $serviceType "ClusterIP") }}
- port: {{ $port.plain_port }}
targetPort: {{ $port.name }}-plain
-{{- if $port.plain_l4_port_protocol }}
+{{- if $port.plain_l4_port_protocol }}
protocol: {{ $port.plain_port_l4_protocol }}
-{{- else }}
+{{- else }}
protocol: {{ default "TCP" $port.l4_protocol }}
-{{- end }}
+{{- end }}
{{- if $port.port_protocol }}
name: {{ printf "%s-%s" $port.port_protocol $port.name }}
{{- else }}
diff --git a/kubernetes/onap/values.yaml b/kubernetes/onap/values.yaml
index 9f69363811..c7399b3f1b 100755
--- a/kubernetes/onap/values.yaml
+++ b/kubernetes/onap/values.yaml
@@ -244,7 +244,7 @@ global:
# Set to false if you want to disable TLS for NodePorts. Be aware that this
# will loosen your security.
# if set this element will force or not tls even if serviceMesh.tls is set.
- # tlsEnabled: false
+ tlsEnabled: false
# Logging
# Currently, centralized logging is not in best shape so it's disabled by