fix(helm): stop shipping conflicting podDisruptionBudget defaults - #42995
fix(helm): stop shipping conflicting podDisruptionBudget defaults#42995Bernedotcom2312 wants to merge 2 commits into
Conversation
Code Review Agent Run #e3d26cActionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Fixes #42997 |
The chart shipped both `minAvailable: 1` and `maxUnavailable: 1` in every
`podDisruptionBudget` block, while the pdb templates `fail` the render when
both are set. Because Helm merges user values on top of the chart defaults,
a consumer who set only `podDisruptionBudget.enabled: true` (or only
`minAvailable: 2`) inherited the default `maxUnavailable: 1` alongside
`minAvailable`, tripping the guard and aborting the entire chart render --
not just the PDB resource:
Error: execution error at (superset/templates/pdb.yaml:23:6):
Only one of minAvailable or maxUnavailable should be set
Default `maxUnavailable` to null in all six blocks (supersetNode,
supersetWorker, supersetCeleryBeat, supersetCeleryFlower,
supersetWebsockets, supersetMcp) so `enabled: true` renders a PDB with the
chart's own `minAvailable: 1`. The guard is kept -- setting both explicitly
should still fail loudly -- but its message now names the offending values
path and says how to resolve it, which is what the mirror case (setting
only `maxUnavailable`, leaving the default `minAvailable`) needs.
Non-breaking: anyone already overriding `maxUnavailable` explicitly keeps
their current behaviour; only the previously-unrenderable default
combination changes.
Adds a helm-unittest suite covering all six PDB templates: nothing rendered
by default, `enabled: true` alone yielding `minAvailable: 1` and no
`maxUnavailable`, overridden `minAvailable`, `maxUnavailable` with
`minAvailable` unset, and the both-set failure.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
cd9bb98 to
3653cf8
Compare
Standardizes the podDisruptionBudget documentation links for consistency with the other five components' PDB blocks. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
/resolve |
Code Review Agent Run #8b9724Actionable Suggestions - 0Filtered by Review RulesBito filtered these suggestions based on rules created automatically for your feedback. Manage rules.
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
rusackas
left a comment
There was a problem hiding this comment.
Nice, this fixes the chart bug directly instead of just documenting the workaround, and pdb_test.yaml covers all six components including the both-set failure case. LGTM!
SUMMARY
The chart ships both
minAvailable: 1andmaxUnavailable: 1in everypodDisruptionBudgetblock, whiletemplates/pdb*.yamlfailthe render when both are set:Helm merges user values on top of the chart defaults, so a consumer who sets only the documented minimal switch —
podDisruptionBudget.enabled: true— inherits the chart's own defaultmaxUnavailable: 1alongside the defaultminAvailable: 1. The guard then trips and aborts the entire chart render, not just the PDB:In other words, the chart's committed defaults violate the invariant its own templates enforce. There is no way to turn a PDB on without already knowing you must null out one of the two fields, which isn't documented in the values comments or the README. Setting
minAvailable: 2fails for the same reason.This has been present since #27163 (Feb 2024) and affects all six blocks:
supersetNode,supersetWorker,supersetCeleryBeat,supersetCeleryFlower,supersetWebsockets,supersetMcp.Changes
values.yaml: defaultmaxUnavailableto null (~, matching the chart's existing nil style such asdatabase.uri: ~) in all six blocks, soenabled: truerenders a PDB with the chart's ownminAvailable: 1. ThemaxUnavailablecomment now states thatminAvailablemust be unset to use it.templates/pdb*.yaml: thefailguard is kept — setting both explicitly should still fail loudly — but the message now names the offending values path and says how to resolve it. This is what the mirror case needs: setting onlymaxUnavailable: 2still trips the guard against the defaultminAvailable: 1, and the old message identified neither the component nor the remedy.tests/pdb_test.yaml: new helm-unittest suite over all six PDB templates.Chart.yaml/README.md: chart version 0.22.5 → 0.22.6 (patch, per the chart's Versioning section) and README regenerated with helm-docs.Backwards compatibility: non-breaking. Anyone already overriding
maxUnavailableexplicitly keeps their exact current behaviour; only the previously-unrenderable default combination changes.TESTING INSTRUCTIONS
Reproduce on the released chart (fails):
With this branch (renders):
Both PDBs render with
minAvailable: 1and nomaxUnavailablekey.minAvailable: 2alone also works now.Automated checks:
The new suite is a genuine regression test: reverting
values.yamltomaxUnavailable: 1makes 2 of its 5 cases fail with the render error above. It covers no PDB rendered by default,enabled: truealone yieldingminAvailable: 1with nomaxUnavailable, an overriddenminAvailable,maxUnavailablewithminAvailableunset, and both-set still failing.ADDITIONAL INFORMATION