diff options
author | Mike Elliott <mike.elliott@amdocs.com> | 2018-04-05 01:08:05 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-04-05 01:08:05 +0000 |
commit | 283a3d9cbb7e9d18294bfaa6f67f980880e57d4a (patch) | |
tree | e8c36e5a4bdbdcd4948ba9cd9fa8ac6d052a4543 /kubernetes/sdnc/templates/service.yaml | |
parent | 4624c12f60bf3d469d2008122902df8d5410952d (diff) | |
parent | b756fb7dd0d1f2ef4dc677f240520fae429baea0 (diff) |
Merge "Multi-site High-availability Manual Failover (PoC)"
Diffstat (limited to 'kubernetes/sdnc/templates/service.yaml')
-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 }} + |