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: |
| 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 }} |
| 27 | spec: |
| 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 | --- |
| 37 | kind: Service |
| 38 | apiVersion: v1 |
| 39 | metadata: |
jmac | 018e37b | 2018-04-05 18:14:10 +0000 | [diff] [blame] | 40 | name: {{ .Release.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 |
| 44 | spec: |
| 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. |
| 61 | apiVersion: v1 |
| 62 | kind: Service |
| 63 | metadata: |
| 64 | name: {{ .Values.service.name }}-read |
| 65 | namespace: {{ include "common.namespace" . }} |
| 66 | labels: |
| 67 | app: {{ include "common.name" . }} |
| 68 | spec: |
| 69 | ports: |
| 70 | - port: {{ .Values.service.internalPort }} |
| 71 | name: {{ .Values.service.name }} |
| 72 | selector: |
| 73 | app: {{ include "common.name" . }} |
| 74 | release: {{ .Release.Name }} |
| 75 | --- |
| 76 | apiVersion: v1 |
| 77 | kind: Service |
| 78 | metadata: |
| 79 | name: {{ .Values.sdnctlPrefix }}-sdnctldb01 |
| 80 | namespace: {{ include "common.namespace" . }} |
| 81 | labels: |
| 82 | app: {{ include "common.name" . }} |
| 83 | spec: |
| 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 | --- |
| 92 | apiVersion: v1 |
| 93 | kind: Service |
| 94 | metadata: |
| 95 | name: {{ .Values.sdnctlPrefix }}-sdnctldb02 |
| 96 | namespace: {{ include "common.namespace" . }} |
| 97 | labels: |
| 98 | app: {{ include "common.name" . }} |
| 99 | spec: |
| 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 Jain | baadb38 | 2018-04-03 11:34:59 -0400 | [diff] [blame] | 107 | --- |
| 108 | {{ if .Values.geoEnabled }} |
| 109 | apiVersion: v1 |
| 110 | kind: Service |
| 111 | metadata: |
| 112 | name: {{ .Values.service.name }}-nodeport |
| 113 | namespace: {{ include "common.namespace" . }} |
| 114 | labels: |
| 115 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 |
| 116 | spec: |
| 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 }} |