blob: ffcc7112b7ff50b852a9146439bd6fa586964a71 [file] [log] [blame]
Mike Elliott13fed112018-02-28 08:33:33 -05001apiVersion: v1
2kind: Service
3metadata:
BorislavG1ffbd992018-04-24 07:56:27 +00004 name: {{ include "common.servicename" . }}
Mike Elliott13fed112018-02-28 08:33:33 -05005 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 }}
11spec:
12 type: {{ .Values.service.type }}
13 ports:
14 {{if eq .Values.service.type "NodePort" -}}
15 - port: {{ .Values.service.externalPort }}
16 targetPort: {{ .Values.service.internalPort }}
17 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
BorislavG1ffbd992018-04-24 07:56:27 +000018 name: {{ .Values.service.portName }}
Mike Elliott13fed112018-02-28 08:33:33 -050019 {{- else -}}
20 - port: {{ .Values.service.externalPort }}
21 targetPort: {{ .Values.service.internalPort }}
BorislavG1ffbd992018-04-24 07:56:27 +000022 name: {{ .Values.service.portName }}
Mike Elliott13fed112018-02-28 08:33:33 -050023 {{- end}}
24 selector:
25 app: {{ include "common.name" . }}
BorislavG1ffbd992018-04-24 07:56:27 +000026 release: {{ .Release.Name }}