Dominic Lunanuova | 50aafc5 | 2018-03-30 02:29:23 +0000 | [diff] [blame] | 1 | apiVersion: v1 |
| 2 | kind: Service |
| 3 | metadata: |
| 4 | name: dmaap-prov-{{ template "postgresql.name" . }} |
| 5 | namespace: {{ .Values.global.nsPrefix }} |
| 6 | labels: |
| 7 | app: {{ template "postgresql.fullname" . }} |
| 8 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" |
| 9 | release: "{{ .Release.Name }}" |
| 10 | heritage: "{{ .Release.Service }}" |
| 11 | {{- if .Values.metrics.enabled }} |
| 12 | annotations: |
| 13 | prometheus.io/scrape: "true" |
| 14 | prometheus.io/port: "9187" |
| 15 | {{- end }} |
| 16 | spec: |
| 17 | type: {{ .Values.service.type }} |
| 18 | ports: |
| 19 | - name: postgresql |
| 20 | port: {{ .Values.service.port }} |
| 21 | targetPort: postgresql |
| 22 | {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }} |
| 23 | nodePort: {{ .Values.service.nodePort }} |
| 24 | {{- end }} |
| 25 | {{- if .Values.service.externalIPs }} |
| 26 | externalIPs: |
| 27 | {{ toYaml .Values.service.externalIPs | indent 4 }} |
| 28 | {{- end }} |
| 29 | selector: |
| 30 | app: {{ template "postgresql.fullname" . }} |