vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 1 | apiVersion: v1 |
| 2 | kind: Service |
| 3 | metadata: |
BorislavG | 26b650f | 2018-05-13 17:11:01 +0000 | [diff] [blame] | 4 | name: {{ include "common.servicename" . }} |
vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 5 | namespace: {{ include "common.namespace" . }} |
| 6 | labels: |
BorislavG | 26b650f | 2018-05-13 17:11:01 +0000 | [diff] [blame] | 7 | app: {{ include "common.name" . }} |
| 8 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 9 | release: {{ .Release.Name }} |
| 10 | heritage: {{ .Release.Service }} |
| 11 | annotations: |
| 12 | service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" |
vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 13 | spec: |
vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 14 | type: {{ .Values.service.type }} |
BorislavG | 26b650f | 2018-05-13 17:11:01 +0000 | [diff] [blame] | 15 | # Not working, open k8s bug: https://github.com/kubernetes/kubernetes/issues/58662 |
| 16 | publishNotReadyAddresses: true |
vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 17 | ports: |
BorislavG | 26b650f | 2018-05-13 17:11:01 +0000 | [diff] [blame] | 18 | {{if eq .Values.service.type "NodePort" -}} |
| 19 | - port: {{ .Values.service.internalPort }} |
| 20 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} |
| 21 | name: {{ .Values.service.portName }} |
| 22 | - port: {{ .Values.service.internalPort2 }} |
| 23 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }} |
| 24 | name: {{ .Values.service.portName3 }} |
| 25 | - port: {{ .Values.service.internalPort3 }} |
| 26 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }} |
| 27 | name: {{ .Values.service.portName3 }} |
| 28 | {{- else -}} |
| 29 | - port: {{ .Values.service.internalPort }} |
| 30 | name: {{ .Values.service.portName }} |
| 31 | - port: {{ .Values.service.internalPort2 }} |
| 32 | name: {{ .Values.service.portName2 }} |
| 33 | - port: {{ .Values.service.internalPort3 }} |
| 34 | name: {{ .Values.service.portName3 }} |
| 35 | {{- end}} |
vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 36 | selector: |
BorislavG | 26b650f | 2018-05-13 17:11:01 +0000 | [diff] [blame] | 37 | app: {{ include "common.name" . }} |
| 38 | release: {{ .Release.Name }} |
| 39 | clusterIP: None |