diff options
author | Neha Jain <neha.jain3@amdocs.com> | 2018-04-03 11:34:59 -0400 |
---|---|---|
committer | Neha Jain <neha.jain3@amdocs.com> | 2018-04-03 11:35:04 -0400 |
commit | baadb38f90168c15b9fc6007b507269ff5c47551 (patch) | |
tree | e4b7d55e5d0b721c7e1739efc4db555de32e038d /kubernetes/common/mysql/templates/service.yaml | |
parent | e611ada51899fd20ba069e75ad1aa718289d33f8 (diff) |
Multi-site High-availability Manual Failover (PoC)
Change-Id: Ib11a01170962a932466bcfb1b12e6e0563476e73
Signed-off-by: Neha Jain <neha.jain3@amdocs.com>
Issue-ID: SDNC-214
Diffstat (limited to 'kubernetes/common/mysql/templates/service.yaml')
-rw-r--r-- | kubernetes/common/mysql/templates/service.yaml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/kubernetes/common/mysql/templates/service.yaml b/kubernetes/common/mysql/templates/service.yaml index c6a28c4605..db08c3a454 100644 --- a/kubernetes/common/mysql/templates/service.yaml +++ b/kubernetes/common/mysql/templates/service.yaml @@ -88,3 +88,27 @@ spec: app: {{ include "common.name" . }} release: {{ .Release.Name }} clusterIP: None +--- +{{ if .Values.geoEnabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.service.name }}-nodeport + namespace: {{ include "common.namespace" . }} + labels: + statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 +spec: + ports: + - name: {{ .Values.service.internalPort }} + port: {{ .Values.service.internalPort }} + targetPort: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.externalPort1 }} + - name: {{ .Values.xtrabackup.internalPort }} + port: {{ .Values.xtrabackup.internalPort }} + targetPort: {{ .Values.xtrabackup.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.externalPort2 }} + type: NodePort + selector: + statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 + release: {{ .Release.Name }} +{{ end }} |