kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 1 | apiVersion: v1 |
| 2 | kind: Service |
| 3 | metadata: |
BorislavG | 20dcf41 | 2018-05-13 17:11:01 +0000 | [diff] [blame] | 4 | name: {{ include "common.servicename" . }} |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 5 | namespace: {{ include "common.namespace" . }} |
| 6 | labels: |
| 7 | app: {{ include "common.name" . }} |
| 8 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 9 | release: {{ .Release.Name }} |
| 10 | heritage: {{ .Release.Service }} |
| 11 | spec: |
| 12 | type: {{ .Values.service.type }} |
| 13 | ports: |
| 14 | {{if eq .Values.service.type "NodePort" -}} |
| 15 | - port: {{ .Values.service.internalPort }} |
| 16 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} |
BorislavG | 20dcf41 | 2018-05-13 17:11:01 +0000 | [diff] [blame] | 17 | name: {{ .Values.service.portName }} |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 18 | - port: {{ .Values.service.internalPort2 }} |
| 19 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }} |
BorislavG | 20dcf41 | 2018-05-13 17:11:01 +0000 | [diff] [blame] | 20 | name: {{ .Values.service.portName2 }} |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 21 | {{- else -}} |
| 22 | - port: {{ .Values.service.internalPort }} |
BorislavG | 20dcf41 | 2018-05-13 17:11:01 +0000 | [diff] [blame] | 23 | name: {{ .Values.service.portName }} |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 24 | - port: {{ .Values.service.internalPort2 }} |
BorislavG | 20dcf41 | 2018-05-13 17:11:01 +0000 | [diff] [blame] | 25 | name: {{ .Values.service.portName2 }} |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 26 | {{- end}} |
| 27 | selector: |
| 28 | app: {{ include "common.name" . }} |
| 29 | release: {{ .Release.Name }} |
| 30 | clusterIP: None |