From 491f4d6f2b31e99d00e1f5384b325027cfa4f8f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Lecoufle?= Date: Tue, 21 Mar 2023 09:41:41 +0100 Subject: [PATCH] Fix Release.Name in job-upgrade-db --- helm/flowforge/templates/job-upgrade-db.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helm/flowforge/templates/job-upgrade-db.yaml b/helm/flowforge/templates/job-upgrade-db.yaml index 76a57fb0..10190368 100644 --- a/helm/flowforge/templates/job-upgrade-db.yaml +++ b/helm/flowforge/templates/job-upgrade-db.yaml @@ -7,7 +7,7 @@ data: upgrade.sh: | #!/bin/sh apk add --no-cache postgresql14-client - psql -v ON_ERROR_STOP=1 -h flowforge-postgresql -U postgres postgres <<-ESQL + psql -v ON_ERROR_STOP=1 -h {{ .Release.Name }}-postgresql -U postgres postgres <<-ESQL SELECT datname FROM pg_database WHERE datistemplate = false; SELECT 'CREATE DATABASE "ff-context"' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'ff-context')\gexec GRANT ALL PRIVILEGES ON DATABASE "ff-context" TO "forge"; @@ -16,7 +16,7 @@ data: apiVersion: batch/v1 kind: Job metadata: - name: flowforge-db-upgrade + name: {{ .Release.Name }}-db-upgrade labels: annotations: "helm.sh/hook": post-upgrade,post-install @@ -37,7 +37,7 @@ spec: - name: PGPASSWORD valueFrom: secretKeyRef: - name: flowforge-postgresql + name: {{ .Release.Name }}-postgresql key: postgresql-postgres-password volumeMounts: - name: upgrade-script