blob: 032920c7606db37c48b1d86817909ed5c9e59926 [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:
20 name: {{ .Values.service.name }}
21 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 }}
30 name: {{ .Values.service.name }}
31 selector:
32 app: {{ include "common.name" . }}
33 release: {{ .Release.Name }}
34 clusterIP: None
35#{{ if not .Values.disableNfsProvisioner }}
36---
37kind: Service
38apiVersion: v1
39metadata:
jmac018e37b2018-04-05 18:14:10 +000040 name: {{ .Release.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:
64 name: {{ .Values.service.name }}-read
65 namespace: {{ include "common.namespace" . }}
66 labels:
67 app: {{ include "common.name" . }}
68spec:
69 ports:
70 - port: {{ .Values.service.internalPort }}
71 name: {{ .Values.service.name }}
72 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 }}
86 name: {{ .Values.service.name }}
87 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 }}
102 name: {{ .Values.service.name }}
103 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:
112 name: {{ .Values.service.name }}-nodeport
113 namespace: {{ include "common.namespace" . }}
114 labels:
115 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
116spec:
117 ports:
118 - name: {{ .Values.service.internalPort }}
119 port: {{ .Values.service.internalPort }}
120 targetPort: {{ .Values.service.internalPort }}
121 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.externalPort1 }}
122 - name: {{ .Values.xtrabackup.internalPort }}
123 port: {{ .Values.xtrabackup.internalPort }}
124 targetPort: {{ .Values.xtrabackup.internalPort }}
125 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.externalPort2 }}
126 type: NodePort
127 selector:
128 statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
129 release: {{ .Release.Name }}
130{{ end }}