blob: dc63e310292a6159b648810ced80124e6aa018be [file] [log] [blame]
jmaca4ddffa2018-04-08 19:28:01 +00001{{/*
2# Copyright © 2017 Amdocs, Bell Canada
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15*/}}
16
Mike Elliott13fed112018-02-28 08:33:33 -050017apiVersion: v1
18kind: Service
19metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000020 name: {{ include "common.servicename" . }}
Mike Elliott13fed112018-02-28 08:33:33 -050021 namespace: {{ include "common.namespace" . }}
22 labels:
23 app: {{ include "common.name" . }}
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
25 release: {{ .Release.Name }}
26 heritage: {{ .Release.Service }}
27spec:
28 ports:
29 - port: {{ .Values.service.internalPort }}
BorislavG1ffbd992018-04-24 07:56:27 +000030 name: {{ .Values.service.portName }}
Mike Elliott13fed112018-02-28 08:33:33 -050031 selector:
32 app: {{ include "common.name" . }}
33 release: {{ .Release.Name }}
34 clusterIP: None
35#{{ if not .Values.disableNfsProvisioner }}
36---
37kind: Service
38apiVersion: v1
39metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000040 name: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
Mike Elliott13fed112018-02-28 08:33:33 -050041 namespace: {{ include "common.namespace" . }}
42 labels:
43 app: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
44spec:
45 ports:
46 - name: nfs
47 port: {{ .Values.service.nfsPort }}
48 - name: mountd
49 port: {{ .Values.service.mountdPort }}
50 - name: rpcbind
51 port: {{ .Values.service.rpcbindPort }}
52 - name: rpcbind-udp
53 port: {{ .Values.service.rpcbindUdpPort }}
54 protocol: UDP
55 selector:
56 app: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
57#{{ end }}
58---
59# Client service for connecting to any MySQL instance for reads.
60# Only master: sdnc-dbhost-0 accepts the write request.
61apiVersion: v1
62kind: Service
63metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000064 name: {{ include "common.servicename" . }}-read
Mike Elliott13fed112018-02-28 08:33:33 -050065 namespace: {{ include "common.namespace" . }}
66 labels:
67 app: {{ include "common.name" . }}
68spec:
69 ports:
70 - port: {{ .Values.service.internalPort }}
BorislavG1ffbd992018-04-24 07:56:27 +000071 name: {{ .Values.service.portName }}
Mike Elliott13fed112018-02-28 08:33:33 -050072 selector:
73 app: {{ include "common.name" . }}
74 release: {{ .Release.Name }}
75---
76apiVersion: v1
77kind: Service
78metadata:
79 name: {{ .Values.sdnctlPrefix }}-sdnctldb01
80 namespace: {{ include "common.namespace" . }}
81 labels:
82 app: {{ include "common.name" . }}
83spec:
84 ports:
85 - port: {{ .Values.service.internalPort }}
BorislavG1ffbd992018-04-24 07:56:27 +000086 name: {{ .Values.service.portName }}
Mike Elliott13fed112018-02-28 08:33:33 -050087 selector:
88 app: {{ include "common.name" . }}
89 release: {{ .Release.Name }}
90 clusterIP: None
91---
92apiVersion: v1
93kind: Service
94metadata:
95 name: {{ .Values.sdnctlPrefix }}-sdnctldb02
96 namespace: {{ include "common.namespace" . }}
97 labels:
98 app: {{ include "common.name" . }}
99spec:
100 ports:
101 - port: {{ .Values.service.internalPort }}
BorislavG1ffbd992018-04-24 07:56:27 +0000102 name: {{ .Values.service.portName }}
Mike Elliott13fed112018-02-28 08:33:33 -0500103 selector:
104 app: {{ include "common.name" . }}
105 release: {{ .Release.Name }}
106 clusterIP: None
Neha Jainbaadb382018-04-03 11:34:59 -0400107---
108{{ if .Values.geoEnabled }}
109apiVersion: v1
110kind: Service
111metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000112 name: {{ include "common.servicename" . }}-nodeport
Neha Jainbaadb382018-04-03 11:34:59 -0400113 namespace: {{ include "common.namespace" . }}
114 labels:
115 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
116spec:
117 ports:
Neha Jain7b0d6c62018-05-17 14:34:49 -0400118 - name: {{ .Values.service.portName | default .Values.service.name }}-1
Neha Jainbaadb382018-04-03 11:34:59 -0400119 port: {{ .Values.service.internalPort }}
120 targetPort: {{ .Values.service.internalPort }}
Neha Jain7b0d6c62018-05-17 14:34:49 -0400121 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodeport1 }}
122 - name: {{ .Values.service.portName | default .Values.service.name }}-2
Neha Jainbaadb382018-04-03 11:34:59 -0400123 port: {{ .Values.xtrabackup.internalPort }}
124 targetPort: {{ .Values.xtrabackup.internalPort }}
Neha Jain7b0d6c62018-05-17 14:34:49 -0400125 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodeport2 }}
126 type: {{ .Values.service.type }}
Neha Jainbaadb382018-04-03 11:34:59 -0400127 selector:
128 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
129 release: {{ .Release.Name }}
130{{ end }}