Skip to content

fix(helm): stop shipping conflicting podDisruptionBudget defaults - #42995

Open
Bernedotcom2312 wants to merge 2 commits into
apache:masterfrom
Bernedotcom2312:fix/helm-pdb-conflicting-defaults
Open

fix(helm): stop shipping conflicting podDisruptionBudget defaults#42995
Bernedotcom2312 wants to merge 2 commits into
apache:masterfrom
Bernedotcom2312:fix/helm-pdb-conflicting-defaults

Conversation

@Bernedotcom2312

@Bernedotcom2312 Bernedotcom2312 commented Aug 10, 2026

Copy link
Copy Markdown

SUMMARY

The chart ships both minAvailable: 1 and maxUnavailable: 1 in every podDisruptionBudget block, while templates/pdb*.yaml fail the render when both are set:

{{- if and .minAvailable .maxUnavailable }}
  {{- fail "Only one of minAvailable or maxUnavailable should be set" }}
{{- end}}

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 default maxUnavailable: 1 alongside the default minAvailable: 1. The guard then trips and aborts the entire chart render, not just the PDB:

Error: execution error at (superset/templates/pdb.yaml:23:6):
  Only one of minAvailable or maxUnavailable should be set

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: 2 fails 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: default maxUnavailable to null (~, matching the chart's existing nil style such as database.uri: ~) in all six blocks, so enabled: true renders a PDB with the chart's own minAvailable: 1. The maxUnavailable comment now states that minAvailable must be unset to use it.
  • templates/pdb*.yaml: the fail guard 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 only maxUnavailable: 2 still trips the guard against the default minAvailable: 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 maxUnavailable explicitly keeps their exact current behaviour; only the previously-unrenderable default combination changes.

TESTING INSTRUCTIONS

Reproduce on the released chart (fails):

helm repo add superset https://apache.github.io/superset
helm repo update

cat > pdb-repro.yaml <<'YAML'
supersetNode:
  podDisruptionBudget:
    enabled: true
supersetWorker:
  podDisruptionBudget:
    enabled: true
YAML

helm template superset superset/superset --version 0.22.5 -f pdb-repro.yaml
# Error: execution error at (superset/templates/pdb.yaml:22:4):
#   Only one of minAvailable or maxUnavailable should be set

With this branch (renders):

helm dependency build helm/superset
helm template superset helm/superset -f pdb-repro.yaml \
  -s templates/pdb.yaml -s templates/pdb-worker.yaml

Both PDBs render with minAvailable: 1 and no maxUnavailable key. minAvailable: 2 alone also works now.

Automated checks:

helm unittest helm/superset   # 11 suites, 110 tests pass (5 new)
helm lint helm/superset       # clean

The new suite is a genuine regression test: reverting values.yaml to maxUnavailable: 1 makes 2 of its 5 cases fail with the render error above. It covers no PDB rendered by default, enabled: true alone yielding minAvailable: 1 with no maxUnavailable, an overridden minAvailable, maxUnavailable with minAvailable unset, and both-set still failing.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@bito-code-review

bito-code-review Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #e3d26c

Actionable Suggestions - 0
Additional Suggestions - 1
  • helm/superset/values.yaml - 1
    • Documentation link inconsistency · Line 1002-1005
      Documentation URL uses escaped `\#` in supersetMcp section (lines 1002, 1004) while all other 10 PDB instances use plain `#`. This inconsistency could cause incorrect link rendering in generated docs. Standardize to plain `#` for consistent anchor formatting.
Review Details
  • Files reviewed - 9 · Commit Range: cd9bb98..cd9bb98
    • helm/superset/Chart.yaml
    • helm/superset/templates/pdb-beat.yaml
    • helm/superset/templates/pdb-flower.yaml
    • helm/superset/templates/pdb-mcp.yaml
    • helm/superset/templates/pdb-worker.yaml
    • helm/superset/templates/pdb-ws.yaml
    • helm/superset/templates/pdb.yaml
    • helm/superset/tests/pdb_test.yaml
    • helm/superset/values.yaml
  • Files skipped - 1
    • helm/superset/README.md - Reason: Filter setting
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 3653cf8
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6a7999f6bd7f53000852bfa2
😎 Deploy Preview https://deploy-preview-42995--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@Bernedotcom2312

Copy link
Copy Markdown
Author

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>
@Bernedotcom2312
Bernedotcom2312 force-pushed the fix/helm-pdb-conflicting-defaults branch from cd9bb98 to 3653cf8 Compare August 10, 2026 09:29
Standardizes the podDisruptionBudget documentation links for consistency with the other five components' PDB blocks.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Bernedotcom2312

Copy link
Copy Markdown
Author

/resolve

@bito-code-review

bito-code-review Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #8b9724

Actionable Suggestions - 0
Filtered by Review Rules

Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.

  • helm/superset/tests/pdb_test.yaml - 1
    • Incomplete multi-template test coverage · Line 35-52
Review Details
  • Files reviewed - 9 · Commit Range: 3653cf8..6317b97
    • helm/superset/Chart.yaml
    • helm/superset/templates/pdb-beat.yaml
    • helm/superset/templates/pdb-flower.yaml
    • helm/superset/templates/pdb-mcp.yaml
    • helm/superset/templates/pdb-worker.yaml
    • helm/superset/templates/pdb-ws.yaml
    • helm/superset/templates/pdb.yaml
    • helm/superset/tests/pdb_test.yaml
    • helm/superset/values.yaml
  • Files skipped - 1
    • helm/superset/README.md - Reason: Filter setting
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@rusackas rusackas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants