Files
charts/bitnami/postgresql/templates/svc-headless.yaml
hanzala1234 fc694c5095 [bitnami/Postgresql] Add explicit namespace field on resources (#5333)
* Update configmap.yaml

* Update extended-config-configmap.yaml

* Update initialization-configmap.yaml

* Update metrics-configmap.yaml

* Update metrics-svc.yaml

* Update networkpolicy.yaml

* Update podsecuritypolicy.yaml

* Update role.yaml

* Update rolebinding.yaml

* Update secrets.yaml

* Update serviceaccount.yaml

* Update statefulset-readreplicas.yaml

* Update statefulset.yaml

* Update svc-headless.yaml

* Update svc-read.yaml

* Update svc.yaml

* Update chart version
2021-01-29 15:37:28 +01:00

29 lines
1.2 KiB
YAML

apiVersion: v1
kind: Service
metadata:
name: {{ template "common.names.fullname" . }}-headless
labels:
{{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
# Use this annotation in addition to the actual publishNotReadyAddresses
# field below because the annotation will stop being respected soon but the
# field is broken in some versions of Kubernetes:
# https://github.com/kubernetes/kubernetes/issues/58662
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
namespace: {{ .Release.Namespace }}
spec:
type: ClusterIP
clusterIP: None
# We want all pods in the StatefulSet to have their addresses published for
# the sake of the other Postgresql pods even before they're ready, since they
# have to be able to talk to each other in order to become ready.
publishNotReadyAddresses: true
ports:
- name: tcp-postgresql
port: {{ template "postgresql.port" . }}
targetPort: tcp-postgresql
selector:
{{- include "common.labels.matchLabels" . | nindent 4 }}