BorislavG | 0433c91 | 2018-03-21 18:35:30 +0200 | [diff] [blame] | 1 | apiVersion: v1 |
| 2 | kind: Service |
| 3 | metadata: |
BorislavG | 014cca7 | 2018-03-28 13:35:30 +0300 | [diff] [blame] | 4 | name: {{ .Values.service.name }} |
BorislavG | 0433c91 | 2018-03-21 18:35:30 +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 | annotations: |
| 12 | spec: |
| 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 Zhao | d0379b1 | 2018-07-30 07:35:08 +0000 | [diff] [blame] | 18 | name: http-{{ .Values.service.name }} |
BorislavG | 0433c91 | 2018-03-21 18:35:30 +0200 | [diff] [blame] | 19 | {{- else -}} |
| 20 | - port: {{ .Values.service.externalPort }} |
| 21 | targetPort: {{ .Values.service.internalPort }} |
Huabing Zhao | d0379b1 | 2018-07-30 07:35:08 +0000 | [diff] [blame] | 22 | name: http-{{ .Values.service.name }} |
BorislavG | 0433c91 | 2018-03-21 18:35:30 +0200 | [diff] [blame] | 23 | {{- end}} |
| 24 | selector: |
| 25 | app: {{ include "common.name" . }} |
| 26 | release: {{ .Release.Name }} |