This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
Fix operator reconcile loop - pass existing PostgreSQL credentals #5
Labels
kind/bug
Something isn't working
Backstory
Backstage chart uses
bitnami/postgresql
chart as a DB provider. When this chart is initially installed it generates credentials for the new database. New credentials are generated, passed to the database pod, and also stored in a Kubernetes Secret. This Secret is in turn mounted to the Backstage pod. Backstage then uses these credentials to access the DB.When a helm upgrade is triggered (the operator does reconcile through helm upgrade), given credentials are regenerated, new password is created for the secret. However, the DB is already seeded with the original credentials so the new password is ignored by the DB. Unfortunately, that's not the case for the Backstage pod, which receives the new credentials which are invalid for the DB.
Solution
Implement a logic that would check for DB credentials Secret in the target namespace and if found, make it enforce this Secret as
.upstream.postgresql.auth.existingSecret
value. This would ensure new credentials are not generated and "old" password remains in use by the Backstage pod.The text was updated successfully, but these errors were encountered: