blob: 3e4a786cb8c8caf1f119e72711818dd1a14e188b [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 - port: {{ .Values.service.externalPortHttps }}
20 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePortHttps }}
21 name: {{ .Values.service.name }}-https
22 {{- else -}}
23 - port: {{ .Values.service.externalPort }}
24 targetPort: {{ .Values.service.internalPort }}
25 name: {{ .Values.service.name }}
26 - port: {{ .Values.service.externalPortHttps }}
27 targetPort: {{ .Values.service.internalPortHttps }}
28 name: {{ .Values.service.name }}-https
29 {{- end}}
30 selector:
31 app: {{ include "common.name" . }}
32 release: {{ .Release.Name }}