From 03be3c6919fe32af96f8f56d445300602619938b Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Sun, 21 Apr 2024 12:44:44 -0500 Subject: [PATCH] Add more reliable postgres service. --- .../cluster/kustomization.yaml | 3 ++- .../cluster/service.yaml | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 kubernetes/apps/database/crunchy-postgres-operator/cluster/service.yaml diff --git a/kubernetes/apps/database/crunchy-postgres-operator/cluster/kustomization.yaml b/kubernetes/apps/database/crunchy-postgres-operator/cluster/kustomization.yaml index 3f5795c7..91bfb9b4 100644 --- a/kubernetes/apps/database/crunchy-postgres-operator/cluster/kustomization.yaml +++ b/kubernetes/apps/database/crunchy-postgres-operator/cluster/kustomization.yaml @@ -6,4 +6,5 @@ resources: - ./externalsecret.yaml - ./gatus.yaml - ./postgrescluster.yaml - - ./pushsecret.yaml \ No newline at end of file + - ./pushsecret.yaml + - ./service.yaml \ No newline at end of file diff --git a/kubernetes/apps/database/crunchy-postgres-operator/cluster/service.yaml b/kubernetes/apps/database/crunchy-postgres-operator/cluster/service.yaml new file mode 100644 index 00000000..654b4fd8 --- /dev/null +++ b/kubernetes/apps/database/crunchy-postgres-operator/cluster/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + postgres-operator.crunchydata.com/cluster: postgres + postgres-operator.crunchydata.com/role: primary + name: postgres-primary-real + namespace: media +spec: + internalTrafficPolicy: Cluster + ports: + - name: postgres + port: 5432 + protocol: TCP + targetPort: postgres + selector: + postgres-operator.crunchydata.com/cluster: postgres + postgres-operator.crunchydata.com/role: master + type: ClusterIP \ No newline at end of file