Geora Barsky | 417b3b4 | 2018-08-17 13:31:36 -0400 | [diff] [blame] | 1 | apiVersion: v1 |
| 2 | kind: Service |
| 3 | metadata: |
| 4 | name: {{ include "common.servicename" . }} |
| 5 | namespace: {{ include "common.namespace" . }} |
| 6 | labels: |
| 7 | app: {{ include "common.name" . }} |
| 8 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame^] | 9 | release: {{ include "common.release" . }} |
Geora Barsky | 417b3b4 | 2018-08-17 13:31:36 -0400 | [diff] [blame] | 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 }} |
| 17 | name: {{ .Values.service.portName }} |
| 18 | {{- else -}} |
| 19 | - port: {{ .Values.service.internalPort }} |
| 20 | name: {{ .Values.service.portName }} |
| 21 | {{- end}} |
| 22 | selector: |
| 23 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame^] | 24 | release: {{ include "common.release" . }} |