-
Notifications
You must be signed in to change notification settings - Fork 9.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
[bitnami/postgresql] Chart Version 12.2.1 leads to missing secret error #15073
Comments
Hi! From which version of the chart are you trying to upgrade? It seems to be an issue coming from the old version. |
Hi, we're upgrading from 12.1.15. I downgraded our dev deployment back to that version after the failing upgrade. |
We got the same issue doing update from helm chart version 12.1.13 to 12.2.0 |
Hi all, I just tried to reproduce the issue but I couldn't do so. I installed version 12.1.15 of the chart and waited for it to be ready. I accessed the database and confirmed I could access PostgreSQL with the provided password. After that, I upgraded the solution to the latest version and didn't get any error
I confirmed I didn't have any previous PVs or PVCs when installing the chart for the first time. Can you check if this configuration (default parameters) work for you?
@jankoh, just to confirm, could you please let us know how you created that secret and its content (you can add example password values there) so we confirm everything is as expected? |
@jotamartos the secret looks the following (passwords replaced): apiVersion: v1
data:
password: password1
postgres-password: password2
replication-password: password3
kind: Secret
metadata:
annotations:
meta.helm.sh/release-name: ai-tool
meta.helm.sh/release-namespace: ai-tool-1322-testing
creationTimestamp: "2023-01-02T15:06:24Z"
labels:
app.kubernetes.io/instance: ai-tool
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: db-ai-tool
helm.sh/chart: db-ai-tool-0.2.0
name: n4r-ai-tool-pgcredentials
namespace: ai-tool-1322-testing
resourceVersion: "139353018"
uid: 3da4ffca-5033-443a-8520-d564679fcd7e
type: Opaque As written: If I try to reproduce the issue locally, I get a "different version" 12.2.1 of the chart; not having the contents of mentioned PR. Using this altered 12.2.1 I can deploy locally; however our deployment routines download the repos when deploying, and I get the error in that case. The file secrets.yaml, line 5, locally looks like that: {{- $postgresPassword = include "common.secrets.passwords.manage" (dict "secret" (include "postgresql.secretName" .) "key" "postgres-password" "providedValues" (list "global.postgresql.auth.postgresPassword" "auth.postgresPassword") "context" $) | trimAll "\"" | b64dec }} which clearly is before merging #15023. However, the PR changes version 12.2.0 to 12.2.1, so there seems to be something weird gong on. |
Hi, we just tested Version 12.2.2 just released. The issue is still present, but we figured the only thing failing is the |
Hi, Sorry for the delay here . I tried to reproduce the issue but I couldn't do so. The steps I followed were the following ones:
As you can see, I didn't get any error in any of the steps. Can you confirm you are following these steps? |
Hi again, as written in the previous comment: the main culprit is the diff step - at least in our deployment. If we simply do a helm upgrade without a diff, the whole thing works. So it's probably a bug or missing feature in the helm diff plugin. We'll move on without the diff for now and are going to use helm secrets in the near future so the "existingSecret" setting will become obsolete for our deployments. |
Sorry, didn't notice that comment. I'm glad to hear that the deployment works as expected. The issue is probably a bug in the diff plugin, you can let them know about this so they take a look at it. Thanks! |
I have the same issue with chart version 12.2.x, helm upgrade does not work anymore with an existingSecret. But I noticed, that if I do I mean if I set In my opinion, there is something wrong with the password check, it does not respect if existingSecret is set. |
Didn't know about this "HELMFILE_MODE". So then you basically run "helmfile sync"? As I understand it well, this will create a new helm release on each run, even if there are no changes. That's not what we want. |
Hey @rmoreas there is (AFAIR) a bug report for the helm diff plugin. The main point here is the mentioned change making the configuration variable names variables themselfs. IIRC, that is what breaks helm diff for some reason. I do agree, the sync is probably not the best solution, it's more a workaround. We aim using helm secrets, specify the secrets directly, and stepping back from using the "existingSecret" configuration in the near future to be able to use diff, again. This is bit of a larger change, so it's not yet finished... |
@jotamartos I do not use any helm plugin. I just do a
If I do a
and after an
I understand that if you let the chart auto generate the password, that you have to provide it. But I specified a fixed password in a secret and as I already said it works fine if I bypass the password check. |
Hi @LGLN-LS, From which version to which one are you upgrading? In my test, I upgraded from 12.1.15 to 12.2.2 (the latest one at that moment)? As you can see there, I didn't get any error and I also created a secret with the password. |
@jotamartos for the purpose of complete testing I created a new database:
Then I tried to upgrade:
|
Sorry, but there should be something wrong in your environment. I tried to follow your steps and everything worked as expected
I also confirmed that the database is created and that I can access the database with the provided credentials. |
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary. |
For anyone interested in a permanent fix: I opened databus23/helm-diff#460 so that we can maybe get to the source of the issue with |
Name and Version
bitnami/postgresql 12.2.1
What steps will reproduce the bug?
Upgrading to chart version 12.2.1 triggers a missing secret error:
The secrets are available in the namespace and contain the needed passwords; Chart-Version 12.1.15 is working using the identical configuration.
What I find extra remarkable: We got the chart update using renovate von Feb 17th; but the commit changing line 5 in secrets.yaml and setting Version to 12.2.1 is dated Feb 20th. Testing on a local Minikube leads to a different 12.2.1 chart having said line still using a hard-coded "postgres-password", which just works fine. Something weird seems to happen...
Are you using any custom parameters or values?
Config used to deploy:
What is the expected behavior?
Deployment should succeed.
What do you see instead?
Deployment fails.
Additional information
No response
The text was updated successfully, but these errors were encountered: