Skip to content

fix: 959 convert extraEnvVars to a map - #960

Merged
anushasunkada merged 2 commits into
mosip:developfrom
bhumi46:fix/extraenvvars-map-format
Aug 18, 2026
Merged

anushasunkada merged 2 commits into
mosip:developfrom
bhumi46:fix/extraenvvars-map-format

Conversation

@bhumi46

@bhumi46 bhumi46 commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Fixes extraEnvVars should be a map, not a list #959
  • Converts extraEnvVars from a YAML list to a native YAML map (keyed by env var name) in
    signup-service and signup-ui, and updates each chart's templates/deployment.yaml to
    render it with a range $key, $val := loop that auto-detects a plain scalar (→ value:)
    vs. a valueFrom map (→ passed through common.tplvalues.render), matching the existing
    domainConfig map's rendering style already used in these charts.
  • Root cause and fix pattern are identical to
    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's extraEnvVars had 14 real entries (string-block | style), including a
    PostgreSQL-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-ui had an empty extraEnvVars: [] default (no real content) — just changed to
    {} for consistency and to make future overrides map-shaped from the start.

Test plan

  • helm lint passes for both charts.
  • helm template rendered env: block for signup-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'}) and
    MOSIP_SIGNUP_FULLNAME_PATTERN/..._ALLOWED_CHARACTERS Unicode-escape values (only
    cosmetic diff elsewhere: values now explicitly quoted).
  • signup-ui renders without error post-change.

Summary by CodeRabbit

  • New Features

    • Added a simpler key-value format for configuring additional environment variables in the Signup Service and Signup UI Helm charts.
    • Environment variables can now be defined directly by name and value, or reference existing ConfigMaps and Secrets.
    • Updated chart examples to reflect the new configuration format.
  • Documentation

    • Clarified how to configure additional environment variables through the provided values files.

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

coderabbitai Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@bhumi46, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b6a29ede-abc0-4311-bbf3-090f2d74170a

📥 Commits

Reviewing files that changed from the base of the PR and between e641fed and 9aa04be.

📒 Files selected for processing (2)
  • deploy/signup-with-plugins/signup-with-mock-plugin/values.yaml
  • deploy/signup-with-plugins/signup-with-mosipid-plugin/values.yaml

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 16560cb5-f2f3-4687-9448-242fc1e4d0e5

📥 Commits

Reviewing files that changed from the base of the PR and between 3342765 and e641fed.

📒 Files selected for processing (4)
  • helm/signup-service/templates/deployment.yaml
  • helm/signup-service/values.yaml
  • helm/signup-ui/templates/deployment.yaml
  • helm/signup-ui/values.yaml

Walkthrough

Both Helm charts change extraEnvVars from list-based configuration to keyed YAML mappings. Deployment templates now render each entry as either a quoted scalar value or a structured field such as valueFrom.

Changes

Extra environment variable configuration

Layer / File(s) Summary
Map-based values configuration
helm/signup-service/values.yaml, helm/signup-ui/values.yaml
extraEnvVars uses keyed mappings. Existing ConfigMap and Secret references remain supported. Literal values use direct key-value entries.
Per-entry deployment rendering
helm/signup-service/templates/deployment.yaml, helm/signup-ui/templates/deployment.yaml
Templates iterate over each mapping entry. Scalar values render as quoted value fields, and map values render as structured environment-variable fields.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to e641f

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
Loading

Poem

Maps line up in ordered rows,
Each variable clearly shows.
Scalars quote, references flow,
Helm shapes the pods below.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the primary change: converting extraEnvVars to a map.
Linked Issues check ✅ Passed The templates and values files satisfy issue [#959] by converting extraEnvVars to maps and preserving value and valueFrom behavior.
Out of Scope Changes check ✅ Passed All changes are limited to the two Helm charts and directly support the extraEnvVars map conversion in [#959].
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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>
@anushasunkada
anushasunkada merged commit b788812 into mosip:develop Aug 18, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants