Files
ess-helm/charts/matrix-stack/templates/postgres/service.yaml
2026-01-22 11:53:32 +01:00

30 lines
688 B
YAML

{{- /*
Copyright 2025 New Vector Ltd
Copyright 2025-2026 Element Creations Ltd
SPDX-License-Identifier: AGPL-3.0-only
*/ -}}
{{- with $.Values.postgres -}}
{{- if (include "element-io.postgres.enabled" (dict "root" $)) }}
apiVersion: v1
kind: Service
metadata:
labels:
{{- include "element-io.postgres.labels" (dict "root" $ "context" .) | nindent 4 }}
name: {{ $.Release.Name }}-postgres
namespace: {{ $.Release.Namespace }}
spec:
type: ClusterIP
clusterIP: None
ports:
- port: 5432
name: postgres
- port: 9187
name: metrics
ipFamilyPolicy: PreferDualStack
selector:
app.kubernetes.io/instance: {{ $.Release.Name }}-postgres
{{- end -}}
{{- end -}}