{{- $name := .Values.fullnameOverride | default "postgresql" -}} # ClusterIP only. Nothing outside the cluster should reach the database, and # there is no Ingress here on purpose — Contour terminates HTTP, and exposing # PostgreSQL's wire protocol through it is neither possible nor wanted. # # Consumers address this as: # {{ $name }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} apiVersion: v1 kind: Service metadata: name: {{ $name }} namespace: {{ .Release.Namespace }} labels: app: {{ $name }} spec: type: ClusterIP selector: app: {{ $name }} ports: - name: postgres port: {{ .Values.service.port }} targetPort: postgres protocol: TCP