J release changes
[ric-plt/ric-dep.git] / helm / infrastructure / subcharts / kong / charts / postgresql / templates / primary / svc-headless.yaml
1 apiVersion: v1
2 kind: Service
3 metadata:
4   name: {{ include "postgresql.primary.svc.headless" . }}
5   namespace: {{ .Release.Namespace | quote }}
6   labels: {{- include "common.labels.standard" . | nindent 4 }}
7     {{- if .Values.commonLabels }}
8     {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
9     {{- end }}
10     app.kubernetes.io/component: primary
11   {{- if .Values.commonAnnotations }}
12   annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
13   {{- end }}
14     # Use this annotation in addition to the actual publishNotReadyAddresses
15     # field below because the annotation will stop being respected soon but the
16     # field is broken in some versions of Kubernetes:
17     # https://github.com/kubernetes/kubernetes/issues/58662
18     service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
19 spec:
20   type: ClusterIP
21   clusterIP: None
22   # We want all pods in the StatefulSet to have their addresses published for
23   # the sake of the other Postgresql pods even before they're ready, since they
24   # have to be able to talk to each other in order to become ready.
25   publishNotReadyAddresses: true
26   ports:
27     - name: tcp-postgresql
28       port: {{ template "postgresql.service.port" . }}
29       targetPort: tcp-postgresql
30   selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
31     app.kubernetes.io/component: primary