From b72e33189201d0148775e4e00d3245295f476784 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Mon, 15 Apr 2024 12:29:47 -0500 Subject: [PATCH] Switch services for postgres. --- .../cluster/pushsecret.yaml | 19 +++++++++++++++++-- .../gatus/app/externalsecret.yaml | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/kubernetes/apps/database/crunchy-postgres-operator/cluster/pushsecret.yaml b/kubernetes/apps/database/crunchy-postgres-operator/cluster/pushsecret.yaml index f89b01a3..d8f26b20 100644 --- a/kubernetes/apps/database/crunchy-postgres-operator/cluster/pushsecret.yaml +++ b/kubernetes/apps/database/crunchy-postgres-operator/cluster/pushsecret.yaml @@ -49,10 +49,25 @@ spec: name: postgres-pguser-gatus data: - match: - secretKey: uri + secretKey: dbname remoteRef: remoteKey: gatus - property: DATABASE_URI + property: pg_database + - match: + secretKey: port + remoteRef: + remoteKey: gatus + property: pg_port + - match: + secretKey: user + remoteRef: + remoteKey: gatus + property: pg_username + - match: + secretKey: password + remoteRef: + remoteKey: gatus + property: pg_password --- # yaml-language-server: $schema=https://ks.hsn.dev/external-secrets.io/pushsecret_v1alpha1.json apiVersion: external-secrets.io/v1alpha1 diff --git a/kubernetes/apps/observability/gatus/app/externalsecret.yaml b/kubernetes/apps/observability/gatus/app/externalsecret.yaml index 58920870..8683a2a5 100644 --- a/kubernetes/apps/observability/gatus/app/externalsecret.yaml +++ b/kubernetes/apps/observability/gatus/app/externalsecret.yaml @@ -15,7 +15,7 @@ spec: data: CUSTOM_PUSHOVER_TOKEN: "{{ .gatus_token }}" CUSTOM_PUSHOVER_USER_KEY: "{{ .userkey_jahanson }}" - DATABASE_URI: "{{ .DATABASE_URI }}" + DATABASE_URI: "postgresql://{{ .pg_username }}:{{ .pg_password }}@postgres-primary-real.database.svc:{{ .pg_port }}/{{ .pg_database }}" dataFrom: - extract: key: pushover