aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/sdnc/templates
diff options
context:
space:
mode:
authorMohammadreza Pasandideh <mohammadreza.pasandideh@amdocs.com>2018-04-03 10:06:45 -0400
committerMohammadreza Pasandideh <mohammadreza.pasandideh@amdocs.com>2018-04-03 13:07:24 -0400
commitb756fb7dd0d1f2ef4dc677f240520fae429baea0 (patch)
tree07df2990f00310c6d127f6190ada4375af4c47df /kubernetes/sdnc/templates
parentae6cefd5abdd568e108ef732ac1298d7ec36702e (diff)
Multi-site High-availability Manual Failover (PoC)
Change-Id: Ic5682433b5284856e3846a641fc64c99e85550b2 Signed-off-by: Mohammadreza Pasandideh <mohammadreza.pasandideh@amdocs.com> Issue-ID: SDNC-214
Diffstat (limited to 'kubernetes/sdnc/templates')
-rw-r--r--kubernetes/sdnc/templates/service.yaml72
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 }}
+