summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorefiacor <fiachra.corcoran@est.tech>2022-05-11 19:39:10 +0100
committerMichal Jagiello <michal.jagiello@t-mobile.pl>2022-05-30 07:38:06 +0000
commit859b18d1e92c4fe88681e91b0d549ea3118c5094 (patch)
treeee268540874f1d02115d2637095469a067bd6cf7
parent4e1a71f1686813d46185ef4b16ed7477d449242b (diff)
[SDC] Fix non ssl NodePort
Use single NodePort when needTLS = true Signed-off-by: efiacor <fiachra.corcoran@est.tech> Change-Id: I094edc8069ace49fdaa0e3fb56796530b748c72e Issue-ID: OOM-2957 (cherry picked from commit 1256637d8781647464fd65529abba20c80fc73fc)
-rw-r--r--kubernetes/sdc/components/sdc-fe/templates/service.yaml20
-rw-r--r--kubernetes/sdc/components/sdc-fe/values.yaml3
2 files changed, 11 insertions, 12 deletions
diff --git a/kubernetes/sdc/components/sdc-fe/templates/service.yaml b/kubernetes/sdc/components/sdc-fe/templates/service.yaml
index 968a09c77e..30c3d1122f 100644
--- a/kubernetes/sdc/components/sdc-fe/templates/service.yaml
+++ b/kubernetes/sdc/components/sdc-fe/templates/service.yaml
@@ -39,17 +39,15 @@ metadata:
spec:
type: {{ .Values.service.type }}
ports:
- - port: {{ .Values.service.internalPort }}
- name: {{ .Values.service.portName }}
- targetPort: {{ .Values.service.internalPort }}
- {{ if (include "common.needTLS" .) }}
- - port: {{ .Values.service.internalPort2 }}
- targetPort: {{ .Values.service.internalPort2 }}
- name: {{ .Values.service.portName }}s
- {{ if eq .Values.service.type "NodePort" -}}
- nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
- {{ end }}
- {{ end }}
+ {{if eq .Values.service.type "NodePort" -}}
+ - port: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.internalPort2 .Values.service.internalPort }}
+ nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+ name: {{ .Values.service.portName }}{{ (eq "true" (include "common.needTLS" .)) | ternary "s" "" }}
+ {{- else -}}
+ - port: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.externalPort2 .Values.service.externalPort }}
+ targetPort: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.internalPort2 .Values.service.internalPort }}
+ name: {{ .Values.service.portName }}{{ (eq "true" (include "common.needTLS" .)) | ternary "s" "" }}
+ {{- end}}
selector:
app: {{ include "common.name" . }}
release: {{ include "common.release" . }}
diff --git a/kubernetes/sdc/components/sdc-fe/values.yaml b/kubernetes/sdc/components/sdc-fe/values.yaml
index 6267da90f3..e86ae4c0d2 100644
--- a/kubernetes/sdc/components/sdc-fe/values.yaml
+++ b/kubernetes/sdc/components/sdc-fe/values.yaml
@@ -114,9 +114,10 @@ service:
portName: http
internalPort: 8181
externalPort: 8181
- nodePort2: "07"
internalPort2: 9443
externalPort2: 9443
+ nodePort: "07"
+
ingress:
enabled: false