Skip to content

Helm chart: podDisruptionBudget.enabled: true alone aborts the whole chart render #72

Description

@jan21deepak

Bug description

The Helm chart ships both minAvailable: 1 and maxUnavailable: 1 as defaults in every
podDisruptionBudget block, while the corresponding templates fail the render when both are set.
Since Helm deep-merges user values on top of the chart defaults, enabling a PDB the documented
minimal way enabled: true inherits the chart's own default maxUnavailable: 1 next to the
default minAvailable: 1, trips the guard, and aborts the entire helm template / install /
upgrade
, not just the PDB resource.

In short: the chart's committed defaults violate the invariant its own templates enforce. There is
no way to set enabled: true alone without tripping it, and the requirement to null out one of the
two fields isn't documented in the values comments or the README.

The guard in helm/superset/templates/pdb.yaml:

{{- with .Values.supersetNode.podDisruptionBudget }}
{{- if .enabled -}}
{{- if and .minAvailable .maxUnavailable }}
  {{- fail "Only one of minAvailable or maxUnavailable should be set" }}
{{- end}}

The conflicting defaults in helm/superset/values.yaml (lines ~408-414, repeated for each component):

podDisruptionBudget:
  enabled: false
  minAvailable: 1
  maxUnavailable: 1

Reproduction steps

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

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

helm template superset superset/superset --version 0.22.4 -f pdb-repro.yaml

Expected: a PodDisruptionBudget for supersetNode and supersetWorker, each with
minAvailable: 1 (the chart's own default).

Actual:

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

Every other resource in the chart fails to render too, not just the PDB.

Setting a value explicitly fails identically, because the default maxUnavailable: 1 is still
merged underneath:

supersetNode:
  podDisruptionBudget:
    enabled: true
    minAvailable: 2

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.11

Node version

16

Browser

Chrome

Additional context

Not a Superset application bug it is in the Helm chart, so no Python logs or stacktrace exist.

Affected chart versions: 0.22.4. Introduced in apache#27163
(Feb 2024) and unchanged since. Confirmed still broken on master by rendering the published
chart, not only by reading the templates.

Affected values blocks all six carry the same conflicting defaults:
supersetNode, supersetWorker, supersetCeleryBeat, supersetCeleryFlower,
supersetWebsockets, supersetMcp.
Templates: pdb.yaml, pdb-worker.yaml, pdb-beat.yaml, pdb-flower.yaml, pdb-ws.yaml,
pdb-mcp.yaml.

Workaround for chart consumers: explicitly null the field you don't want, e.g.

supersetNode:
  podDisruptionBudget:
    enabled: true
    minAvailable: 2
    maxUnavailable: null

With GitOps tooling this is more awkward: Kustomize strategic-merge treats null in a values patch
as key deletion, which would also drop the key you are trying to set, so a JSON6902 patch is needed
to route around the chart bug.

Mirror case: setting only maxUnavailable also fails, against the default minAvailable: 1,
and the error message names neither the component nor the remedy.

Proposed fix: default maxUnavailable to null in all six blocks, keeping the fail guard for
users who genuinely set both. Non-breaking : anyone overriding maxUnavailable explicitly is
unaffected.

A PR implementing this is open: apache#42995

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Imported from the parent repository for autonomous engineering evaluation.

Source issue: apache#42997

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions