summaryrefslogtreecommitdiffstats
path: root/kubernetes/sdc/components/sdc-fe/templates/service.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/sdc/components/sdc-fe/templates/service.yaml')
-rw-r--r--kubernetes/sdc/components/sdc-fe/templates/service.yaml20
1 files changed, 9 insertions, 11 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" . }}