-
Notifications
You must be signed in to change notification settings - Fork 54
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
[zabbix-community/zabbix] issue title "Secret not created for external database with postgresql.enabled=false" #141
Comments
|
The idea of |
Hi @fibbs! I think it's reasonable and easy to do this. I would just need to adjust the 'if' statement on line 1 of the secret, right? |
Let me look at it and also at the documentation and whether it may have to be rephrased. |
Uff! I just figured out something ugly! Auto-creating the secret will in any ways not work when using I will try to figure out a way around this:
After looking at it more in detail, yes we could add some more One thing to make this a bit less complex would be to remove That would make it still complex, but quite a bit less than what it is now. I will work on a proposal for this during the next days. |
Hi Team, One more we donot want zabbix/templates/job-create-upgrade-db.yaml to run . but it getting trigger when we make if and .Values.zabbixServer.enabled .Values.zabbixServer.zabbixServerHA.enabled . please help here . |
Hi, @fibbs! I suggest a direct and simple path... Reference: https://stackoverflow.com/questions/8001094/bash-shell-infinite-loop-with-if-else-statment This avoids code complexity in the helm chart and makes explicit a requirement and responsibility for those who want to work in this scenario. What do you think? Do you agree @tapanswain1? |
Hi @tapanswain1! About disabling the job execution, I got confused... Why don't you want the job to run? What problem do you see in that? Anyway, I think we can create a specific boolean variable for this, but keep the value true (by default). |
Problem is that with the last change the job would also get stuck if you just did a "stupid install" with |
Sorry, do absolutely not get what you are wanting to say here. You say you want the secret be created, agreed, as this is what the initial Issue is about. But you also mention you want to use SealedSecrets Operator which actually assumes you are creating the secret externally, prior of installing the Helm Chart. Procecure for working with SealedSecrets is as follows:
For such a scenario you would have
That part I don't get either. If you do not want job-create-upgrade-db.yaml to run, you simple switch Please clarify :-) |
Got it @fibbs! Thanks for explaining the issue. |
Actually, Helm and those pre/post jobs make it even more complicated, as there is no "multi-level dependencies" there. Would be awesome to have a way to define specific manifests to be deployed before actual pre-jobs are run, but Helm doesn't go that far. We are working on the very border to need an operator here, which is something I see the need for in the future but I would like to omit as long as possible. I am already working on the solution and scratching my head a lot, and I will let you know here before creating the PR so you may have a first look onto how I thought it could be a good solution, @aeciopires |
@fibbs look this: helm/helm#10292 |
which would be switching back to the post-install / post-upgrade hooks as we had it before. But that doesn't work in our case due to the fact that zabbix server pods should not be accessing the database when the job accesses it, as otherwise it will refuse to upgrade the schema in case of a major release upgrade. That's what I tried to trick with the init containers though, but these blocked Helm from recognizing the release to be "Ready" when using |
what caught my attention was the ability to reduce weight between the hooks to have some control over the order... |
@aeciopires If you want, please check out this: fibbs@fab9b16 I am not yet at the point where I want to create a PR out of this, but at least the first check worked perfectly. I will do a lot more testing and writing, and then create a PR. Next year :-) |
Description
When using an external PostgreSQL database (
postgresql.enabled=false
), the Helm chart does not create the required Secret for database credentials, even thoughunifiedSecretAutoCreate=true
anduseUnifiedSecret=true
. This makes it difficult to configure the chart for external databases without manually creating the Secret.Steps to Reproduce
postgresql.enabled=false
invalues.yaml
.postgresAccess.useUnifiedSecret=true
andpostgresAccess.unifiedSecretAutoCreate=true
.Expected Behavior
The chart should create the Secret for database credentials when
unifiedSecretAutoCreate=true
anduseUnifiedSecret=true
, regardless ofpostgresql.enabled
.Actual Behavior
The chart does not create the Secret if
postgresql.enabled=false
.Workaround
Manually create the Secret for database credentials.
Suggested Fix
Update the Secret template condition in the Helm chart to remove the dependency on
postgresql.enabled
.The text was updated successfully, but these errors were encountered: