blob: a2f96a843e456271f7205b686d47c948c95837e2 [file] [log] [blame]
kj6a8ce802018-03-19 15:07:44 +02001apiVersion: v1
2kind: Service
3metadata:
BorislavGdd207052018-05-22 11:31:39 +00004 name: {{ include "common.servicename" . }}
kj6a8ce802018-03-19 15:07:44 +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 }}
11spec:
12 ports:
13 {{if eq .Values.service.type "NodePort" -}}
BorislavGdd207052018-05-22 11:31:39 +000014 - name: {{ .Values.service.portName }}
15 port: {{ .Values.service.externalPort }}
kj6a8ce802018-03-19 15:07:44 +020016 targetPort: {{ .Values.service.internalPort }}
17 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
BorislavGdd207052018-05-22 11:31:39 +000018 - name: {{ .Values.service.portName2 }}
19 port: {{ .Values.service.externalPort2 }}
kj6a8ce802018-03-19 15:07:44 +020020 targetPort: {{ .Values.service.internalPort2 }}
21 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
22 {{- else -}}
23 - port: {{ .Values.service.externalPort }}
24 targetPort: {{ .Values.service.internalPort }}
BorislavGdd207052018-05-22 11:31:39 +000025 name: {{ .Values.service.portName }}
kj6a8ce802018-03-19 15:07:44 +020026 - port: {{ .Values.service.externalPort2 }}
27 targetPort: {{ .Values.service.internalPort2 }}
BorislavGdd207052018-05-22 11:31:39 +000028 name: {{ .Values.service.portName }}
kj6a8ce802018-03-19 15:07:44 +020029 {{- end}}
30 type: {{ .Values.service.type }}
31 selector:
32 app: {{ include "common.name" . }}
BorislavGdd207052018-05-22 11:31:39 +000033 clusterIP: {{ .Values.service.aaiServiceClusterIp }}