Add more reliable postgres service.

This commit is contained in:
Joseph Hanson 2024-04-21 12:44:44 -05:00
parent 05514f88fd
commit 03be3c6919
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
2 changed files with 21 additions and 1 deletions

View file

@ -7,3 +7,4 @@ resources:
- ./gatus.yaml - ./gatus.yaml
- ./postgrescluster.yaml - ./postgrescluster.yaml
- ./pushsecret.yaml - ./pushsecret.yaml
- ./service.yaml

View file

@ -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