From d3afd7a2f1c12de4d02777585550183b04167625 Mon Sep 17 00:00:00 2001 From: Alex Nordlund Date: Tue, 8 Nov 2022 17:18:57 +0100 Subject: [PATCH] Fix helm postgresql secret (#19678) * Revert "Fix helm chart use of Postgres Password (#19537)" This reverts commit 6094a916b185ae0634e016004deb4cec11afbaca. * Revert "Fix PostgreSQL password reference for jobs (#19504)" This reverts commit dae954ef111b8e0ab17812d156f6c955b77d9859. * Revert "Fix PostgreSQL password reference (#19502)" This reverts commit 9bf6a8af82391fa8b32112deb4a36a0cfc68143e. * Correct default username in postgresql auth --- chart/templates/cronjob-media-remove.yaml | 2 +- chart/templates/deployment-sidekiq.yaml | 2 +- chart/templates/deployment-streaming.yaml | 2 +- chart/templates/deployment-web.yaml | 2 +- chart/templates/job-assets-precompile.yaml | 2 +- chart/templates/job-chewy-upgrade.yaml | 2 +- chart/templates/job-create-admin.yaml | 2 +- chart/templates/job-db-migrate.yaml | 2 +- chart/templates/secrets.yaml | 2 +- chart/values.yaml | 4 ++-- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/chart/templates/cronjob-media-remove.yaml b/chart/templates/cronjob-media-remove.yaml index 1dced69ec7..160aee2042 100644 --- a/chart/templates/cronjob-media-remove.yaml +++ b/chart/templates/cronjob-media-remove.yaml @@ -59,7 +59,7 @@ spec: valueFrom: secretKeyRef: name: {{ template "mastodon.postgresql.secretName" . }} - key: postgres-password + key: password - name: "REDIS_PASSWORD" valueFrom: secretKeyRef: diff --git a/chart/templates/deployment-sidekiq.yaml b/chart/templates/deployment-sidekiq.yaml index 4b108d79df..994a66445e 100644 --- a/chart/templates/deployment-sidekiq.yaml +++ b/chart/templates/deployment-sidekiq.yaml @@ -76,7 +76,7 @@ spec: valueFrom: secretKeyRef: name: {{ template "mastodon.postgresql.secretName" . }} - key: postgres-password + key: password - name: "REDIS_PASSWORD" valueFrom: secretKeyRef: diff --git a/chart/templates/deployment-streaming.yaml b/chart/templates/deployment-streaming.yaml index 564f53f433..12203a530b 100644 --- a/chart/templates/deployment-streaming.yaml +++ b/chart/templates/deployment-streaming.yaml @@ -44,7 +44,7 @@ spec: valueFrom: secretKeyRef: name: {{ template "mastodon.postgresql.secretName" . }} - key: postgres-password + key: password - name: "REDIS_PASSWORD" valueFrom: secretKeyRef: diff --git a/chart/templates/deployment-web.yaml b/chart/templates/deployment-web.yaml index 0878aa9b87..ab722c77b1 100644 --- a/chart/templates/deployment-web.yaml +++ b/chart/templates/deployment-web.yaml @@ -62,7 +62,7 @@ spec: valueFrom: secretKeyRef: name: {{ template "mastodon.postgresql.secretName" . }} - key: postgres-password + key: password - name: "REDIS_PASSWORD" valueFrom: secretKeyRef: diff --git a/chart/templates/job-assets-precompile.yaml b/chart/templates/job-assets-precompile.yaml index 37009822e6..faa51a20d9 100644 --- a/chart/templates/job-assets-precompile.yaml +++ b/chart/templates/job-assets-precompile.yaml @@ -60,7 +60,7 @@ spec: valueFrom: secretKeyRef: name: {{ template "mastodon.postgresql.secretName" . }} - key: postgres-password + key: password - name: "REDIS_PASSWORD" valueFrom: secretKeyRef: diff --git a/chart/templates/job-chewy-upgrade.yaml b/chart/templates/job-chewy-upgrade.yaml index a4bac63abc..ae6fb38e12 100644 --- a/chart/templates/job-chewy-upgrade.yaml +++ b/chart/templates/job-chewy-upgrade.yaml @@ -61,7 +61,7 @@ spec: valueFrom: secretKeyRef: name: {{ template "mastodon.postgresql.secretName" . }} - key: postgres-password + key: password - name: "REDIS_PASSWORD" valueFrom: secretKeyRef: diff --git a/chart/templates/job-create-admin.yaml b/chart/templates/job-create-admin.yaml index c1c0bdaed5..659c00671f 100644 --- a/chart/templates/job-create-admin.yaml +++ b/chart/templates/job-create-admin.yaml @@ -66,7 +66,7 @@ spec: valueFrom: secretKeyRef: name: {{ template "mastodon.postgresql.secretName" . }} - key: postgres-password + key: password - name: "REDIS_PASSWORD" valueFrom: secretKeyRef: diff --git a/chart/templates/job-db-migrate.yaml b/chart/templates/job-db-migrate.yaml index 848ed36441..8e4f70dfb1 100644 --- a/chart/templates/job-db-migrate.yaml +++ b/chart/templates/job-db-migrate.yaml @@ -60,7 +60,7 @@ spec: valueFrom: secretKeyRef: name: {{ template "mastodon.postgresql.secretName" . }} - key: postgres-password + key: password - name: "REDIS_PASSWORD" valueFrom: secretKeyRef: diff --git a/chart/templates/secrets.yaml b/chart/templates/secrets.yaml index 2a91c34934..d7ac936ce5 100644 --- a/chart/templates/secrets.yaml +++ b/chart/templates/secrets.yaml @@ -37,7 +37,7 @@ data: {{- end }} {{- if not .Values.postgresql.enabled }} {{- if not .Values.postgresql.auth.existingSecret }} - postgres-password: "{{ .Values.postgresql.auth.password | b64enc }}" + password: "{{ .Values.postgresql.auth.password | b64enc }}" {{- end }} {{- end }} {{- end -}} diff --git a/chart/values.yaml b/chart/values.yaml index dc57d86209..ef349c0875 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -141,7 +141,7 @@ postgresql: # postgresqlHostname: preexisting-postgresql auth: database: mastodon_production - username: postgres + username: mastodon # you must set a password; the password generated by the postgresql chart will # be rotated on each upgrade: # https://github.com/bitnami/charts/tree/master/bitnami/postgresql#upgrade @@ -149,7 +149,7 @@ postgresql: # Set same value as above postgresPassword: "" # you can also specify the name of an existing Secret - # with a key of postgres-password set to the password you want + # with a key of password set to the password you want existingSecret: "" # https://github.com/bitnami/charts/tree/master/bitnami/redis#parameters