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 }} |
| 18 | name: {{ .Values.service.name }} |
| 19 | - port: {{ .Values.service.externalPortHttps }} |
| 20 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePortHttps }} |
| 21 | name: {{ .Values.service.name }}-https |
| 22 | {{- else -}} |
| 23 | - port: {{ .Values.service.externalPort }} |
| 24 | targetPort: {{ .Values.service.internalPort }} |
| 25 | name: {{ .Values.service.name }} |
| 26 | - port: {{ .Values.service.externalPortHttps }} |
| 27 | targetPort: {{ .Values.service.internalPortHttps }} |
| 28 | name: {{ .Values.service.name }}-https |
| 29 | {{- end}} |
| 30 | selector: |
| 31 | app: {{ include "common.name" . }} |
| 32 | release: {{ .Release.Name }} |