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 }}
10 app.kubernetes.io/component: primary
11 {{- if .Values.commonAnnotations }}
12 annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
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"
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
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