Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame^] | 1 | apiVersion: v1 |
| 2 | kind: Service |
| 3 | metadata: |
| 4 | name: {{ include "common.fullname" . }} |
| 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 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} |
| 17 | name: {{ .Values.service.name }} |
| 18 | {{- else -}} |
| 19 | - port: {{ .Values.service.externalPort }} |
| 20 | targetPort: {{ .Values.service.internalPort }} |
| 21 | name: {{ .Values.service.name }} |
| 22 | {{- end}} |
| 23 | selector: |
| 24 | app: {{ include "common.name" . }} |
| 25 | release: {{ .Release.Name }} |