-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Operator regenerates DB password without redeploying Postgres #14630
Comments
@davidfestal could you please take a look and comment ? |
I'm looking into it. |
To give more detail, here is exactly what I'm doing in terms of the commands executed. This assumes che-operator master branch checked out and be present in the root of the checkout:
and here are the operator logs for the time:
The update of the CR that causes the failure starts at |
So, this bug doesn't happen anytime an existing Custom Resource is changed. It only happens if you reset the password fields of an existing, already-reconciled
The main reason is that, when you apply the changed CR again from the yaml file you have locally, you override the Postgres and Keycloak passwords to empty strings. This triggers the generation of new passwords by the operator, and brings the bug, because the password change is not detected and the Postgres POD is not restarted. For now the preferred way to change an existing custom resource is to patch it, instead of applying it. |
Describe the bug
If a user changes the tag of the che image in the CR, the server is redeployed with that new image.
But the operator also creates a new random DB password and updates the che config map with it, without redeploying the Postgres server, which leads to a non-functioning installation.
Che version
N/A
Steps to reproduce
nightly
for example)POSTGRESQL_PASSWORD
env var of the postgres pod and theCHE_JDBC_PASSWORD
env var in the che config mapExpected behavior
The db password should not change because of the changed che server image.
Runtime
minikube
Installation method
che-operator from
master
Environment
Linux
The text was updated successfully, but these errors were encountered: