blob: c61cdd549b94f294f24ae4601239b116dea5d78f [file] [log] [blame]
Mike Elliott13fed112018-02-28 08:33:33 -05001apiVersion: v1
2kind: Service
3metadata:
4 name: {{ include "common.fullname" . }}
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 }}
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 }}
18 name: {{ .Values.service.name }}
19 {{- else -}}
20 - port: {{ .Values.service.externalPort }}
21 targetPort: {{ .Values.service.internalPort }}
22 name: {{ .Values.service.name }}
23 {{- end}}
24 selector:
25 app: {{ include "common.name" . }}
26 release: {{ .Release.Name }}