Bernedotcom2312 opened a new issue, #42997:
URL: https://github.com/apache/superset/issues/42997

   ### 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`:
   
   ```gotemplate
   {{- 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):
   
   ```yaml
   podDisruptionBudget:
     enabled: false
     minAvailable: 1
     maxUnavailable: 1
   ```
   
   ### Reproduction steps
   
   ```bash
   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:
   
   ```yaml
   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 #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.
   
   ```yaml
   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/superset#42995
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [x] 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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to