philipljh opened a new pull request, #42114:
URL: https://github.com/apache/superset/pull/42114

   ### SUMMARY
   
   Setting `*.initContainers` today **replaces** the chart's default init 
container list, so adding a single custom init container forces users to copy 
the chart's `wait-for-postgres` / `wait-for-postgres-redis` definitions into 
their values file. That copy silently drifts across chart upgrades (e.g. #40425 
rewrote the wait containers from `dockerize` to a bash TCP wait - any values 
file carrying the old copy kept the stale behavior).
   
   This adds an additive `extraInitContainers` value to every pod that supports 
init containers: `supersetNode`, `supersetWorker`, `supersetCeleryBeat`, 
`supersetCeleryFlower`, and `init`. Extras are appended **after** 
`initContainers`, and Kubernetes runs init containers sequentially in list 
order, so the chart's wait-for containers always run before user-supplied ones.
   
   **Behavior**
   
   | `initContainers` | `extraInitContainers` | Result |
   |---|---|---|
   | default | unset | unchanged — rendered output is identical to 0.20.0 |
   | default | set | chart defaults, then extras |
   | overridden | set | override, then extras |
   | `[]` | set | extras only |
   
   **Notes**
   - Both lists keep being evaluated through `tpl` (per #31878), so extras 
support templating (e.g. `image: "{{ .Values.image.repository }}:tag"`).
   - New `helm unittest` suite (`tests/init_containers_test.yaml`) covers 
default rendering, append ordering, templating in extras, replace-plus-append, 
and extras-only for all five templates.
   - `README.md` regenerated by helm-docs; bumped to **0.21.0** .
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   N/A
   
   ### TESTING INSTRUCTIONS
   ```bash
   helm dependency build helm/superset
   helm lint helm/superset
   
   # Unit tests
   helm unittest helm/superset
   
   # Default render is unchanged: only the chart's wait-for container
   helm template t helm/superset --show-only templates/deployment.yaml \
     | sed -n '/initContainers:/,/containers:/p'
   
   # Extras are appended after the default wait-for container
   helm template t helm/superset \
     --set 'supersetNode.extraInitContainers[0].name=prepare-assets' \
     --set 'supersetNode.extraInitContainers[0].image=busybox' \
     --show-only templates/deployment.yaml \
     | sed -n '/initContainers:/,/containers:/p'
   ```
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: Fixes #42108
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [x] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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