blob: f6373c83684091931aedbe21c8fea14dcbab514b [file] [log] [blame]
Dominic Lunanuova50aafc52018-03-30 02:29:23 +00001apiVersion: v1
2kind: Service
3metadata:
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 }}
16spec:
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" . }}