Repository navigation
fix: 959 convert extraEnvVars to a map - #960
Conversation
Helm merges map keys across values layers but replaces lists wholesale, so any downstream override of extraEnvVars had to re-declare the whole list just to change one entry. Convert extraEnvVars to a map keyed by env var name in signup-service and signup-ui, and render it with a range loop that auto-detects plain scalars vs. valueFrom, matching the existing domainConfig pattern already used in these charts. Same fix already applied to mosip/esignet (issue #2380) and mosip/esignet-mock-services (issue mosip#602). Signed-off-by: bhumi46 <thisisbn46@gmail.com>
|
Warning Review limit reached
Next review available in: 42 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
WalkthroughBoth Helm charts change ChangesExtra environment variable configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The charts change extra environment variables from list format to map format while preserving rendered values and supporting targeted overrides; no actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant HelmValues
participant DeploymentTemplates
participant KubernetesDeployment
HelmValues->>DeploymentTemplates: provide keyed extraEnvVars mapping
DeploymentTemplates->>DeploymentTemplates: detect scalar or structured value
DeploymentTemplates->>KubernetesDeployment: emit individual env entries
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
deploy/signup-with-plugins/{signup-with-mock-plugin,signup-with-mosipid-plugin}/values.yaml
still set extraEnvVars as a list, which these install.sh scripts pass
via -f against the same signup-service chart converted to a map
default in this PR. Rendering confirmed this produced broken
index-keyed env entries (0, 1, 2, ...) against the current chart.
Convert both to the map contract.
Signed-off-by: bhumi46 <thisisbn46@gmail.com>
Summary
extraEnvVarsfrom a YAML list to a native YAML map (keyed by env var name) insignup-serviceandsignup-ui, and updates each chart'stemplates/deployment.yamltorender it with a
range $key, $val :=loop that auto-detects a plain scalar (→value:)vs. a
valueFrommap (→ passed throughcommon.tplvalues.render), matching the existingdomainConfigmap's rendering style already used in these charts.mosip/esignet#2380 /
mosip/esignet#2381 and
mosip/esignet-mock-services#602:
Helm deep-merges map keys across values layers but replaces lists wholesale, so any
downstream override had to restate the entire list just to change one entry.
signup-service'sextraEnvVarshad 14 real entries (string-block|style), including aPostgreSQL-array-literal string value and a Khmer-script Unicode-escape regex pattern —
both preserved byte-for-byte via a scripted transformation rather than manual retyping, to
eliminate transcription risk.
signup-uihad an emptyextraEnvVars: []default (no real content) — just changed to{}for consistency and to make future overrides map-shaped from the start.Test plan
helm lintpasses for both charts.helm templaterenderedenv:block forsignup-service(the chart with real content)compared before/after (list vs. map values.yaml) — every name/value/valueFrom matches
exactly, including the tricky
MOSIP_SIGNUP_SUPPORTED_LANGUAGES({'eng','khm'}) andMOSIP_SIGNUP_FULLNAME_PATTERN/..._ALLOWED_CHARACTERSUnicode-escape values (onlycosmetic diff elsewhere: values now explicitly quoted).
signup-uirenders without error post-change.Summary by CodeRabbit
New Features
Documentation