blob: 696b22a80da087fe84a0c3fe444c070317581b35 [file] [log] [blame]
jasmineWenf7997b42018-09-19 23:37:35 +00001apiVersion: v1
2kind: Service
3metadata:
4 name: {{ .Values.service.name }}
5 namespace: {{ include "common.namespace" . }}
6 labels:
7 app: {{ include "common.name" . }}
8 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +01009 release: {{ include "common.release" . }}
jasmineWenf7997b42018-09-19 23:37:35 +000010 heritage: {{ .Release.Service }}
11 annotations:
12spec:
13 type: {{ .Values.service.type }}
14 ports:
15 {{if eq .Values.service.type "NodePort" -}}
16 - port: {{ .Values.service.externalPort }}
17 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
Sylvain Desbureaux0b243b62019-12-11 11:53:42 +010018 name: {{ .Values.service.portName }}
jasmineWenf7997b42018-09-19 23:37:35 +000019 {{- else -}}
20 - port: {{ .Values.service.externalPort }}
21 targetPort: {{ .Values.service.internalPort }}
Sylvain Desbureaux0b243b62019-12-11 11:53:42 +010022 name: {{ .Values.service.portName }}
jasmineWenf7997b42018-09-19 23:37:35 +000023 {{- end}}
24 selector:
25 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010026 release: {{ include "common.release" . }}