blob: e1771c60549a07d55428cf6249398d8bf1bf79c3 [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
sushil masal08ef7092019-02-21 16:21:51 +053044 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
45 release: {{ .Release.Name }}
46 heritage: {{ .Release.Service }}
Mike Elliott13fed112018-02-28 08:33:33 -050047spec:
48 ports:
49 - name: nfs
50 port: {{ .Values.service.nfsPort }}
51 - name: mountd
52 port: {{ .Values.service.mountdPort }}
53 - name: rpcbind
54 port: {{ .Values.service.rpcbindPort }}
55 - name: rpcbind-udp
56 port: {{ .Values.service.rpcbindUdpPort }}
57 protocol: UDP
58 selector:
59 app: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
60#{{ end }}
61---
62# Client service for connecting to any MySQL instance for reads.
63# Only master: sdnc-dbhost-0 accepts the write request.
64apiVersion: v1
65kind: Service
66metadata:
BorislavG1ffbd992018-04-24 07:56:27 +000067 name: {{ include "common.servicename" . }}-read
Mike Elliott13fed112018-02-28 08:33:33 -050068 namespace: {{ include "common.namespace" . }}
69 labels:
70 app: {{ include "common.name" . }}
sushil masal08ef7092019-02-21 16:21:51 +053071 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
72 release: {{ .Release.Name }}
73 heritage: {{ .Release.Service }}
Mike Elliott13fed112018-02-28 08:33:33 -050074spec:
75 ports:
76 - port: {{ .Values.service.internalPort }}
BorislavG1ffbd992018-04-24 07:56:27 +000077 name: {{ .Values.service.portName }}
Mike Elliott13fed112018-02-28 08:33:33 -050078 selector:
79 app: {{ include "common.name" . }}
80 release: {{ .Release.Name }}
81---
82apiVersion: v1
83kind: Service
84metadata:
85 name: {{ .Values.sdnctlPrefix }}-sdnctldb01
86 namespace: {{ include "common.namespace" . }}
87 labels:
88 app: {{ include "common.name" . }}
sushil masal08ef7092019-02-21 16:21:51 +053089 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
90 release: {{ .Release.Name }}
91 heritage: {{ .Release.Service }}
Mike Elliott13fed112018-02-28 08:33:33 -050092spec:
93 ports:
94 - port: {{ .Values.service.internalPort }}
BorislavG1ffbd992018-04-24 07:56:27 +000095 name: {{ .Values.service.portName }}
Mike Elliott13fed112018-02-28 08:33:33 -050096 selector:
97 app: {{ include "common.name" . }}
98 release: {{ .Release.Name }}
99 clusterIP: None
100---
101apiVersion: v1
102kind: Service
103metadata:
104 name: {{ .Values.sdnctlPrefix }}-sdnctldb02
105 namespace: {{ include "common.namespace" . }}
106 labels:
107 app: {{ include "common.name" . }}
sushil masal08ef7092019-02-21 16:21:51 +0530108 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
109 release: {{ .Release.Name }}
110 heritage: {{ .Release.Service }}
Mike Elliott13fed112018-02-28 08:33:33 -0500111spec:
112 ports:
113 - port: {{ .Values.service.internalPort }}
BorislavG1ffbd992018-04-24 07:56:27 +0000114 name: {{ .Values.service.portName }}
Mike Elliott13fed112018-02-28 08:33:33 -0500115 selector:
116 app: {{ include "common.name" . }}
117 release: {{ .Release.Name }}
118 clusterIP: None
Neha Jainbaadb382018-04-03 11:34:59 -0400119---
120{{ if .Values.geoEnabled }}
121apiVersion: v1
122kind: Service
123metadata:
BorislavG1ffbd992018-04-24 07:56:27 +0000124 name: {{ include "common.servicename" . }}-nodeport
Neha Jainbaadb382018-04-03 11:34:59 -0400125 namespace: {{ include "common.namespace" . }}
126 labels:
sushil masal08ef7092019-02-21 16:21:51 +0530127 app: {{ include "common.name" . }}
128 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Neha Jainbaadb382018-04-03 11:34:59 -0400129 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
sushil masal08ef7092019-02-21 16:21:51 +0530130 release: {{ .Release.Name }}
131 heritage: {{ .Release.Service }}
Neha Jainbaadb382018-04-03 11:34:59 -0400132spec:
133 ports:
Neha Jain7b0d6c62018-05-17 14:34:49 -0400134 - name: {{ .Values.service.portName | default .Values.service.name }}-1
Neha Jainbaadb382018-04-03 11:34:59 -0400135 port: {{ .Values.service.internalPort }}
136 targetPort: {{ .Values.service.internalPort }}
Neha Jain7b0d6c62018-05-17 14:34:49 -0400137 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodeport1 }}
138 - name: {{ .Values.service.portName | default .Values.service.name }}-2
Neha Jainbaadb382018-04-03 11:34:59 -0400139 port: {{ .Values.xtrabackup.internalPort }}
140 targetPort: {{ .Values.xtrabackup.internalPort }}
Neha Jain7b0d6c62018-05-17 14:34:49 -0400141 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodeport2 }}
142 type: {{ .Values.service.type }}
Neha Jainbaadb382018-04-03 11:34:59 -0400143 selector:
144 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
145 release: {{ .Release.Name }}
146{{ end }}