kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 1 | apiVersion: v1 |
| 2 | kind: Service |
| 3 | metadata: |
BorislavG | dd20705 | 2018-05-22 11:31:39 +0000 | [diff] [blame] | 4 | name: {{ include "common.servicename" . }} |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 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 }} |
| 11 | spec: |
| 12 | ports: |
| 13 | {{if eq .Values.service.type "NodePort" -}} |
BorislavG | dd20705 | 2018-05-22 11:31:39 +0000 | [diff] [blame] | 14 | - name: {{ .Values.service.portName }} |
| 15 | port: {{ .Values.service.externalPort }} |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 16 | targetPort: {{ .Values.service.internalPort }} |
| 17 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} |
BorislavG | dd20705 | 2018-05-22 11:31:39 +0000 | [diff] [blame] | 18 | - name: {{ .Values.service.portName2 }} |
| 19 | port: {{ .Values.service.externalPort2 }} |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 20 | 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 }} |
BorislavG | dd20705 | 2018-05-22 11:31:39 +0000 | [diff] [blame] | 25 | name: {{ .Values.service.portName }} |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 26 | - port: {{ .Values.service.externalPort2 }} |
| 27 | targetPort: {{ .Values.service.internalPort2 }} |
BorislavG | dd20705 | 2018-05-22 11:31:39 +0000 | [diff] [blame] | 28 | name: {{ .Values.service.portName }} |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 29 | {{- end}} |
| 30 | type: {{ .Values.service.type }} |
| 31 | selector: |
| 32 | app: {{ include "common.name" . }} |
BorislavG | dd20705 | 2018-05-22 11:31:39 +0000 | [diff] [blame] | 33 | clusterIP: {{ .Values.service.aaiServiceClusterIp }} |