jmac | a4ddffa | 2018-04-08 19:28:01 +0000 | [diff] [blame] | 1 | {{/* |
| 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 Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 17 | apiVersion: v1 |
| 18 | kind: Service |
| 19 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 20 | name: {{ include "common.servicename" . }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 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 }} |
| 27 | spec: |
| 28 | ports: |
| 29 | - port: {{ .Values.service.internalPort }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 30 | name: {{ .Values.service.portName }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 31 | selector: |
| 32 | app: {{ include "common.name" . }} |
| 33 | release: {{ .Release.Name }} |
| 34 | clusterIP: None |
| 35 | #{{ if not .Values.disableNfsProvisioner }} |
| 36 | --- |
| 37 | kind: Service |
| 38 | apiVersion: v1 |
| 39 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 40 | name: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 41 | namespace: {{ include "common.namespace" . }} |
| 42 | labels: |
| 43 | app: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner |
sushil masal | 08ef709 | 2019-02-21 16:21:51 +0530 | [diff] [blame] | 44 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 45 | release: {{ .Release.Name }} |
| 46 | heritage: {{ .Release.Service }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 47 | spec: |
| 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. |
| 64 | apiVersion: v1 |
| 65 | kind: Service |
| 66 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 67 | name: {{ include "common.servicename" . }}-read |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 68 | namespace: {{ include "common.namespace" . }} |
| 69 | labels: |
| 70 | app: {{ include "common.name" . }} |
sushil masal | 08ef709 | 2019-02-21 16:21:51 +0530 | [diff] [blame] | 71 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 72 | release: {{ .Release.Name }} |
| 73 | heritage: {{ .Release.Service }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 74 | spec: |
| 75 | ports: |
| 76 | - port: {{ .Values.service.internalPort }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 77 | name: {{ .Values.service.portName }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 78 | selector: |
| 79 | app: {{ include "common.name" . }} |
| 80 | release: {{ .Release.Name }} |
| 81 | --- |
| 82 | apiVersion: v1 |
| 83 | kind: Service |
| 84 | metadata: |
| 85 | name: {{ .Values.sdnctlPrefix }}-sdnctldb01 |
| 86 | namespace: {{ include "common.namespace" . }} |
| 87 | labels: |
| 88 | app: {{ include "common.name" . }} |
sushil masal | 08ef709 | 2019-02-21 16:21:51 +0530 | [diff] [blame] | 89 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 90 | release: {{ .Release.Name }} |
| 91 | heritage: {{ .Release.Service }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 92 | spec: |
| 93 | ports: |
| 94 | - port: {{ .Values.service.internalPort }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 95 | name: {{ .Values.service.portName }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 96 | selector: |
| 97 | app: {{ include "common.name" . }} |
| 98 | release: {{ .Release.Name }} |
| 99 | clusterIP: None |
| 100 | --- |
| 101 | apiVersion: v1 |
| 102 | kind: Service |
| 103 | metadata: |
| 104 | name: {{ .Values.sdnctlPrefix }}-sdnctldb02 |
| 105 | namespace: {{ include "common.namespace" . }} |
| 106 | labels: |
| 107 | app: {{ include "common.name" . }} |
sushil masal | 08ef709 | 2019-02-21 16:21:51 +0530 | [diff] [blame] | 108 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 109 | release: {{ .Release.Name }} |
| 110 | heritage: {{ .Release.Service }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 111 | spec: |
| 112 | ports: |
| 113 | - port: {{ .Values.service.internalPort }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 114 | name: {{ .Values.service.portName }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 115 | selector: |
| 116 | app: {{ include "common.name" . }} |
| 117 | release: {{ .Release.Name }} |
| 118 | clusterIP: None |
Neha Jain | baadb38 | 2018-04-03 11:34:59 -0400 | [diff] [blame] | 119 | --- |
| 120 | {{ if .Values.geoEnabled }} |
| 121 | apiVersion: v1 |
| 122 | kind: Service |
| 123 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 124 | name: {{ include "common.servicename" . }}-nodeport |
Neha Jain | baadb38 | 2018-04-03 11:34:59 -0400 | [diff] [blame] | 125 | namespace: {{ include "common.namespace" . }} |
| 126 | labels: |
sushil masal | 08ef709 | 2019-02-21 16:21:51 +0530 | [diff] [blame] | 127 | app: {{ include "common.name" . }} |
| 128 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Neha Jain | baadb38 | 2018-04-03 11:34:59 -0400 | [diff] [blame] | 129 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 |
sushil masal | 08ef709 | 2019-02-21 16:21:51 +0530 | [diff] [blame] | 130 | release: {{ .Release.Name }} |
| 131 | heritage: {{ .Release.Service }} |
Neha Jain | baadb38 | 2018-04-03 11:34:59 -0400 | [diff] [blame] | 132 | spec: |
| 133 | ports: |
Neha Jain | 7b0d6c6 | 2018-05-17 14:34:49 -0400 | [diff] [blame] | 134 | - name: {{ .Values.service.portName | default .Values.service.name }}-1 |
Neha Jain | baadb38 | 2018-04-03 11:34:59 -0400 | [diff] [blame] | 135 | port: {{ .Values.service.internalPort }} |
| 136 | targetPort: {{ .Values.service.internalPort }} |
Neha Jain | 7b0d6c6 | 2018-05-17 14:34:49 -0400 | [diff] [blame] | 137 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodeport1 }} |
| 138 | - name: {{ .Values.service.portName | default .Values.service.name }}-2 |
Neha Jain | baadb38 | 2018-04-03 11:34:59 -0400 | [diff] [blame] | 139 | port: {{ .Values.xtrabackup.internalPort }} |
| 140 | targetPort: {{ .Values.xtrabackup.internalPort }} |
Neha Jain | 7b0d6c6 | 2018-05-17 14:34:49 -0400 | [diff] [blame] | 141 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodeport2 }} |
| 142 | type: {{ .Values.service.type }} |
Neha Jain | baadb38 | 2018-04-03 11:34:59 -0400 | [diff] [blame] | 143 | selector: |
| 144 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 |
| 145 | release: {{ .Release.Name }} |
| 146 | {{ end }} |