blob: a41fc38d231e5298e6a954d222ec15a70cc764af [file] [log] [blame]
Mandeep Khindaa1047f42018-03-22 02:12:15 +00001apiVersion: 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.internalPort }}
16 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
17 name: {{ .Values.service.name }}
18 - port: {{ .Values.service.internalPort2 }}
19 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
20 name: {{ .Values.service.name }}2
21 {{- else -}}
22 - port: {{ .Values.service.externalPort }}
23 targetPort: {{ .Values.service.internalPort }}
24 name: {{ .Values.service.name }}
25 - port: {{ .Values.service.externalPort2 }}
26 targetPort: {{ .Values.service.internalPort2 }}
27 name: {{ .Values.service.name }}2
28 {{- end}}
29 selector:
30 app: {{ include "common.name" . }}
31 release: {{ .Release.Name }}