about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPatrice Ferlet <metal3d@gmail.com>2020-11-02 06:16:51 +0100
committerGitHub <noreply@github.com>2020-11-02 06:16:51 +0100
commit4b2ec4a2dc3348ff27f74f442e408d92075bf7c2 (patch)
tree2293b38fcfee057355993bf09024452b42f776d6
parentfa929d8b81002c95f729517d3ce3985f090c5980 (diff)
Fix postrgres secret name for cronjob (#15072)
The cronjob tries to get key from `mastodon` secret instead of
`mastodon-postgresql` - so the cronjob fails with this error:

Error: couldn't find key postgresql-password in Secret [NS]/mastodon

Another solution is to save the postgres password in mastodon secret,
but that means that the password is placed in two places.

Postgresql use <fullname>-postgresql name as secret name.
-rw-r--r--chart/templates/cronjob-media-remove.yaml2
1 files changed, 1 insertions, 1 deletions
diff --git a/chart/templates/cronjob-media-remove.yaml b/chart/templates/cronjob-media-remove.yaml
index 5d78f3395..8a01a2551 100644
--- a/chart/templates/cronjob-media-remove.yaml
+++ b/chart/templates/cronjob-media-remove.yaml
@@ -55,7 +55,7 @@ spec:
                       {{- if .Values.postgresql.enabled }}
                       name: {{ .Release.Name }}-postgresql
                       {{- else }}
-                      name: {{ template "mastodon.fullname" . }}
+                      name: {{ template "mastodon.fullname" . }}-postgresql
                       {{- end }}
                       key: postgresql-password
                 - name: "REDIS_PASSWORD"