]> cat aescling's git repositories - mastodon.git/commitdiff
Fix postrgres secret name for cronjob (#15072)
authorPatrice Ferlet <metal3d@gmail.com>
Mon, 2 Nov 2020 05:16:51 +0000 (06:16 +0100)
committerGitHub <noreply@github.com>
Mon, 2 Nov 2020 05:16:51 +0000 (06:16 +0100)
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.

chart/templates/cronjob-media-remove.yaml

index 5d78f3395c1e4b26c4e5bc43f665b308d01d4081..8a01a255181bdf7bd59ac9885af04faa0093069b 100644 (file)
@@ -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"