From b987929a40b413d6764dbd675d172006b8999cf8 Mon Sep 17 00:00:00 2001 From: Dylan Leard Date: Wed, 15 Jan 2025 17:02:01 -0800 Subject: [PATCH] chore: fix makefile & use alphanumeric pwds when creating pgo useres --- Makefile | 8 +++++++- chart/cas-cif/templates/postgres.yaml | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c7614ff4e..dbf99659d 100644 --- a/Makefile +++ b/Makefile @@ -246,7 +246,13 @@ install: @set -euo pipefail; \ dagConfig=$$(echo '{"org": "bcgov", "repo": "cas-cif", "ref": "$(GIT_SHA1)", "path": "dags/cas_cif_dags.py"}' | base64 -w0); \ helm dep up $(CHART_DIR); \ - helm install $(HELM_OPTS) $(CHART_INSTANCE) $(CHART_DIR); + if ! helm status --namespace $(NAMESPACE) $(CHART_INSTANCE); then \ + echo 'Installing the application'; \ + helm install $(HELM_OPTS) $(CHART_INSTANCE) $(CHART_DIR); \ + else \ + helm upgrade $(HELM_OPTS) $(CHART_INSTANCE) $(CHART_DIR); \ + fi; + restore_prereq: ## Prerequisites for the restore target diff --git a/chart/cas-cif/templates/postgres.yaml b/chart/cas-cif/templates/postgres.yaml index 4754651b4..83e73575e 100644 --- a/chart/cas-cif/templates/postgres.yaml +++ b/chart/cas-cif/templates/postgres.yaml @@ -71,13 +71,19 @@ spec: postgres-operator.crunchydata.com/role: pgbouncer users: - name: cif + password: + type: AlphaNumeric databases: - cif options: "CREATEROLE" - name: cifapp + password: + type: AlphaNumeric databases: - cif - name: postgres + password: + type: AlphaNumeric databases: - cif backups: