blob: 86442a2740deca8f2009049b0cb478148b30303d [file] [log] [blame]
BorislavG0433c912018-03-21 18:35:30 +02001apiVersion: v1
2kind: Service
3metadata:
BorislavG014cca72018-03-28 13:35:30 +03004 name: {{ .Values.service.name }}
BorislavG0433c912018-03-21 18:35:30 +02005 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 }}
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 }}
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 }}