summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/mysql/templates/service.yaml
diff options
context:
space:
mode:
authorMike Elliott <mike.elliott@amdocs.com>2018-04-05 01:07:40 +0000
committerGerrit Code Review <gerrit@onap.org>2018-04-05 01:07:40 +0000
commit4624c12f60bf3d469d2008122902df8d5410952d (patch)
tree766573d1cb0a77501ffea955a33b82ee38dcf5e3 /kubernetes/common/mysql/templates/service.yaml
parentad6382f57e802ced0892ea103bf880e11050590b (diff)
parentbaadb38f90168c15b9fc6007b507269ff5c47551 (diff)
Merge "Multi-site High-availability Manual Failover (PoC)"
Diffstat (limited to 'kubernetes/common/mysql/templates/service.yaml')
-rw-r--r--kubernetes/common/mysql/templates/service.yaml24
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 }}