Helm: access to postgres data is lost after upgrade if postgres.postgresPassowrd
is not explicitly set
#3844
Replies: 2 comments 1 reply
-
I guess the solution is to manage this secret outside the chart and use the See https://github.com/bitnami/charts/tree/master/bitnami/postgresql#postgresql-parameters |
Beta Was this translation helpful? Give feedback.
-
This still seems to be an issue, I feel like i have lost data too many times for now.
Postgress chart:
values:
It would be fantastic if the official wikijs helm chart would be compatible with the arm architecture. I think it is only the default database deployment that do not have an arm image in the repository. But, I am stuck in figuring out what happens, it might only happening when a new wikijs image are deployed or so (im using latest tag). |
Beta Was this translation helpful? Give feedback.
-
Steps to reproduce:
postgres.postgresPassword
value.kubectl delete pod ...
)When the new pod/container is started, it no longer has access to the postgres database.
log excerpt:
This is caused by the fact that when the Helm release is updated, a new random postgres password is generated and stored in a secret. Next time the pod reschedules, it picks up the new secret. However, the postgres data stored on the persistent volume is protected using the old password, so it is no longer accessible.
This is a bug in the postgresql chart, as it should fail the upgrade if a password is not specified. It does this if used directly, but in Helm 3 it does not when used as a subchart, because the macro to check for the password value is in the
NOTES.txt
template, which Helm doesn't render by default. I've raised the following bug against that chart: bitnami/charts#6121However, I think this is also a bug in the wiki.js chart. At the very least, some documentation should be added to the chart README indicating that data will be lost if a postgres password isn't explicitly specified. Ideally, the chart would fail if the value is missing.
Beta Was this translation helpful? Give feedback.
All reactions