diff options
Diffstat (limited to 'kubernetes/sdnc/templates')
-rw-r--r-- | kubernetes/sdnc/templates/service.yaml | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/kubernetes/sdnc/templates/service.yaml b/kubernetes/sdnc/templates/service.yaml index 7744499e97..487368e721 100644 --- a/kubernetes/sdnc/templates/service.yaml +++ b/kubernetes/sdnc/templates/service.yaml @@ -79,3 +79,75 @@ spec: release: {{ .Release.Name }} sessionAffinity: None type: ClusterIP + +{{ if .Values.geoEnabled }} +--- +apiVersion: v1 +kind: Service +metadata: + name: sdnhost-{{ include "common.fullname" . }}-0 + namespace: {{ .Release.Namespace }} + labels: + statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 +spec: + ports: + - name: {{ include "common.fullname" . }}-0-port-{{ .Values.service.internalPort4 }} + port: {{ .Values.service.clusterPort2 }} + targetPort: {{ .Values.service.internalPort4 }} + nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort4 }} + - name: {{ include "common.fullname" . }}-0-port-{{ .Values.service.internalPort }} + port: {{ .Values.service.clusterPort3 }} + targetPort: {{ .Values.service.internalPort }} + nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort1 }} + type: NodePort + selector: + statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 +{{ end }} +{{ if .Values.geoEnabled }} +--- +apiVersion: v1 +kind: Service +metadata: + name: sdnhost-{{ include "common.fullname" . }}-1 + namespace: {{ .Release.Namespace }} + labels: + statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1 +spec: + ports: + - name: {{ include "common.fullname" . }}-1-port-{{ .Values.service.internalPort4 }} + port: {{ .Values.service.clusterPort2 }} + targetPort: {{ .Values.service.internalPort4 }} + nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort5 }} + - name: {{ include "common.fullname" . }}-1-port-{{ .Values.service.internalPort }} + port: {{ .Values.service.clusterPort3 }} + targetPort: {{ .Values.service.internalPort }} + nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort2 }} + type: NodePort + selector: + statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1 +{{ end }} +{{ if .Values.geoEnabled }} +--- +apiVersion: v1 +kind: Service +metadata: + name: sdnhost-{{ include "common.fullname" . }}-2 + namespace: {{ .Release.Namespace }} + labels: + statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2 +spec: + ports: + - name: {{ include "common.fullname" . }}-2-port-{{ .Values.service.internalPort4 }} + port: {{ .Values.service.clusterPort2 }} + targetPort: {{ .Values.service.internalPort4 }} + nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort6 }} + - name: {{ include "common.fullname" . }}-2-port-{{ .Values.service.internalPort }} + port: {{ .Values.service.clusterPort3 }} + targetPort: {{ .Values.service.internalPort }} + nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort3 }} + type: NodePort + selector: + statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2 +--- +{{ end }} + |