feat(chart): add extraEnv and extraEnvFrom escape hatches - #1
Merged
Conversation
Consumers had no way to set an environment variable the chart does not model, and consumers rendering through nixidy cannot patch a list-typed field onto a helm-rendered workload, so every unmodelled variable required a chart release. `common.extraEnv` applies to all components; `singleNode`, `replicationManager` and `viewSyncer` each take their own, appended after the common entries. Both land after the chart's own variables, so repeating a name the chart sets overrides it under Kubernetes' last-wins rule. They apply to the zero-cache container only, and render byte-identically to before when empty.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
extraEnvandextraEnvFromto the zero-cache chart, scoped per component.common.extraEnvapplies to every component.singleNode,replicationManagerand
viewSyncereach take their own, appended after the common entries. Same forextraEnvFrom.Why
The chart exposed no way for a consumer to set an environment variable it does not
already model, and consumers rendering through nixidy cannot patch a list-typed
field onto a helm-rendered workload — list overrides are silently dropped while
scalar overrides land. So every unmodelled variable required a chart release.
Documented as an escape hatch, not the preferred way to configure zero-cache:
anything with real semantics should get a typed value so consumers get validation
and defaults.
Semantics
overrides it under Kubernetes' last-wins rule. Supported, not merely tolerated.
EnvVar/EnvFromSource; not validated bythe chart. (
EnvVar.valuemust be a string — quote numbers.)Verification
diffagainst the published 2.1.3 artifact is clean for both single-node andmulti-node with the values omitted.
entries with the override last; per-component isolation holds.
helm lint,kubeconform -strict(incl. avalueFromsecretKeyRef), and55 pytest tests pass — 14 new in
tests/test_templates.py.Chart version bumped 2.1.3 -> 2.2.0 (minor; backward-compatible feature).
chart.nixintentionally untouched — the CLI reconciles it against the publishedversion at publish time.