summaryrefslogtreecommitdiffstats
path: root/kubernetes/sdnc/templates/service.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/sdnc/templates/service.yaml')
-rw-r--r--kubernetes/sdnc/templates/service.yaml39
1 files changed, 16 insertions, 23 deletions
diff --git a/kubernetes/sdnc/templates/service.yaml b/kubernetes/sdnc/templates/service.yaml
index 1fe4ee3ded..3490dff9ab 100644
--- a/kubernetes/sdnc/templates/service.yaml
+++ b/kubernetes/sdnc/templates/service.yaml
@@ -38,17 +38,14 @@ metadata:
}
]'
spec:
- type: NodePort
+ type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }}
ports:
- name: "{{ .Values.service.portName }}-restconf"
- {{ if not .Values.global.aafEnabled }}
port: {{ .Values.service.externalPort }}
targetPort: {{ .Values.service.internalPort }}
- {{- else -}}
- port: {{ .Values.service.externalPort4 }}
- targetPort: {{ .Values.service.internalPort4 }}
- {{ end }}
+ {{ if not (include "common.ingressEnabled" .) }}
nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }}
+ {{ end }}
{{ if .Values.config.sdnr.enabled }}
sessionAffinity: ClientIP
{{ end }}
@@ -111,15 +108,13 @@ metadata:
statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
spec:
ports:
- - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort4 }}
- port: {{ .Values.service.clusterPort2 }}
- targetPort: {{ .Values.service.internalPort4 }}
- nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort4 }}
- name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort }}
port: {{ .Values.service.clusterPort3 }}
targetPort: {{ .Values.service.internalPort }}
+ {{ if not (include "common.ingressEnabled" .) }}
nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort1 }}
- type: NodePort
+ {{ end }}
+ type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }}
selector:
statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
{{ end }}
@@ -134,15 +129,13 @@ metadata:
statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1
spec:
ports:
- - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort4 }}
- port: {{ .Values.service.clusterPort2 }}
- targetPort: {{ .Values.service.internalPort4 }}
- nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort5 }}
- name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort }}
port: {{ .Values.service.clusterPort3 }}
targetPort: {{ .Values.service.internalPort }}
+ {{ if not (include "common.ingressEnabled" .) }}
nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort2 }}
- type: NodePort
+ {{ end }}
+ type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }}
selector:
statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1
{{ end }}
@@ -157,15 +150,13 @@ metadata:
statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
spec:
ports:
- - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort4 }}
- port: {{ .Values.service.clusterPort2 }}
- targetPort: {{ .Values.service.internalPort4 }}
- nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort6 }}
- name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort }}
port: {{ .Values.service.clusterPort3 }}
targetPort: {{ .Values.service.internalPort }}
+ {{ if not (include "common.ingressEnabled" .) }}
nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort3 }}
- type: NodePort
+ {{ end }}
+ type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }}
selector:
statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
{{ end }}
@@ -183,13 +174,15 @@ metadata:
release: {{ include "common.release" . }}
heritage: {{ .Release.Service }}
spec:
- type: NodePort
+ type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }}
ports:
- name: "{{ .Values.service.portName }}-callhome"
port: {{ .Values.service.callHomePort }}
targetPort: {{ .Values.service.callHomePort }}
+ {{ if not (include "common.ingressEnabled" .) }}
nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.callHomeNodePort }}
+ {{ end }}
selector:
app.kubernetes.io/name: {{ include "common.name" . }}
app.kubernetes.io/instance: {{ include "common.release" . }}
-{{ end }}
+{{ end }} \ No newline at end of file