Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 1 | apiVersion: v1 |
| 2 | kind: Service |
| 3 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame^] | 4 | name: {{ include "common.servicename" . }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [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 | type: {{ .Values.service.type }} |
| 13 | ports: |
| 14 | {{if eq .Values.service.type "NodePort" -}} |
| 15 | - port: {{ .Values.service.externalPort }} |
| 16 | targetPort: {{ .Values.service.internalPort }} |
| 17 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame^] | 18 | name: {{ .Values.service.portName }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 19 | {{- else -}} |
| 20 | - port: {{ .Values.service.externalPort }} |
| 21 | targetPort: {{ .Values.service.internalPort }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame^] | 22 | name: {{ .Values.service.portName }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 23 | {{- end}} |
| 24 | selector: |
| 25 | app: {{ include "common.name" . }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame^] | 26 | release: {{ .Release.Name }} |