blob: 5c7d83049b746e4aea16efcc86dbe161fab1c26e [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 }}
Huabing Zhaod0379b12018-07-30 07:35:08 +000018 name: http-{{ .Values.service.name }}
BorislavG0433c912018-03-21 18:35:30 +020019 - port: {{ .Values.service.externalPortHttps }}
20 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePortHttps }}
Huabing Zhaod0379b12018-07-30 07:35:08 +000021 name: https-{{ .Values.service.name }}
BorislavG0433c912018-03-21 18:35:30 +020022 {{- else -}}
23 - port: {{ .Values.service.externalPort }}
24 targetPort: {{ .Values.service.internalPort }}
Huabing Zhaod0379b12018-07-30 07:35:08 +000025 name: http-{{ .Values.service.name }}
BorislavG0433c912018-03-21 18:35:30 +020026 - port: {{ .Values.service.externalPortHttps }}
27 targetPort: {{ .Values.service.internalPortHttps }}
Huabing Zhaod0379b12018-07-30 07:35:08 +000028 name: https-{{ .Values.service.name }}
BorislavG0433c912018-03-21 18:35:30 +020029 {{- end}}
30 selector:
31 app: {{ include "common.name" . }}
32 release: {{ .Release.Name }}