Skip to content

[#1880, #1881] config-server chart: local/native repo fixes (develop) - #1883

Merged
ckm007 merged 3 commits into
mosip:developfrom
bhumi46:issue-1828-develop
Oct 23, 2026
Merged

ckm007 merged 3 commits into
mosip:developfrom
bhumi46:issue-1828-develop

Conversation

@bhumi46

@bhumi46 bhumi46 commented Oct 22, 2026

Copy link
Copy Markdown
Member

Summary

Forward-port to develop of the config-server chart fixes made on the release-1.3.x PR #1878, found while testing on dev1.

Closes #1880
Closes #1881

Issues fixed

Native composite repos lost their volume (CodeRabbit review on #1878)

After #1828, the PVC and volume mount were created only when localRepo.enabled=true. A composite repo of type: native (documented in the chart README) then had no /var/lib/config_repo.
Fix: new helper config-server.needsVolume, true when localRepo.enabled or a native composite repo is configured. The PVC, volume and volumeMount are gated on it.

#1880: Local repo search-locations not applied

The local-repo settings were passed as lowercase, hyphenated env names (e.g. spring_cloud_config_server_native_search-locations). Spring Boot does not bind that form, so native.search-locations stayed at its default and files on the mounted volume were never served.
Fix: use the canonical names (SPRING_CLOUD_CONFIG_SERVER_NATIVE_SEARCHLOCATIONS, ..._ACCEPTEMPTY, ..._GIT_FORCEPULL, ..._GIT_REFRESHRATE, ..._GIT_CLONEONSTART).

#1881: Composite repo of type: native ignores the mounted volume

Every composite entry got git-style settings (COMPOSITE_<n>_URI, CLONE_ON_START, FORCE_PULL, REFRESH_RATE) regardless of type. Spring's native repository reads search-locations, not uri.
Fix: for type: native, emit SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_<n>_SEARCHLOCATIONS from uri and skip the git-only settings.

Changes

  • helm/config-server/templates/_helpers.tpl: add config-server.needsVolume
  • helm/config-server/templates/config-pvc.yaml, deployment.yaml: gate volume/PVC on needsVolume; canonical local-repo env names; native composite SEARCHLOCATIONS

The CodeRabbit copy_cm_func.sh changes from #1878 are not included: develop removed that file in e6940df (copy_cm.sh downloads it from mosip-infra).

Testing

The chart templates are identical to the head of #1878. That chart was tested on dev1 through install.sh, one namespace per case:

Scenario Result
Git only / blank / invalid menu input ✅ profile composite, no PVC
Local only (option 2) ✅ PVC Bound on nfs-csi, profile native, local file served (#1880)
Both (option 3) ✅ composite,native, git + local served
type: native composite entry, local repo off ✅ PVC + mount created, local file served (#1881)
Private git repo + PAT ✅ served
Two git repos (mosip-config + inji-config) ✅ both served
Repo with properties under a subfolder (searchFolders) ✅ served
Upgrade from published chart 1.3.1-develop ✅ PVC binds, no static PV left

Related: #1828, #1878

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI; Enforced overrides: Organization
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 44458bba-0aed-4e01-aace-4118b5de1f9c
📥 Commits

Reviewing files that changed from the base of the PR and between 1553ebd and c067f64.

📒 Files selected for processing: 3
  • helm/config-server/templates/_helpers.tpl
  • helm/config-server/templates/config-pvc.yaml
  • helm/config-server/templates/deployment.yaml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

bhumi46 and others added 3 commits October 22, 2026 17:31
Address CodeRabbit review on the release-1.3.x cherry-pick: mount the volume and
create the PVC when localRepo is enabled or a composite repo of type native is
configured (config-server.needsVolume).

(cherry picked from commit 86a25d7, copy_cm_func.sh changes dropped because
develop removed that file in e6940df)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: bhumi46 <thisisbn46@gmail.com>
… settings

Lowercase hyphenated names such as spring_cloud_config_server_native_search-locations
are not bound by Spring Boot, so native search-locations fell back to its default
and files on the mounted config repo volume were never served.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 4d5eb07)
Signed-off-by: bhumi46 <thisisbn46@gmail.com>
Native composite entries only received git-style settings (URI, CLONE_ON_START,
FORCE_PULL, REFRESH_RATE). Spring's native repository reads search-locations,
so files on the mounted config repo volume were never served. Map uri to
SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_<n>_SEARCHLOCATIONS for type native.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit b1bae98)
Signed-off-by: bhumi46 <thisisbn46@gmail.com>
@bhumi46
bhumi46 force-pushed the issue-1828-develop branch from 2f23f86 to c067f64 Compare October 22, 2026 12:01
@ckm007 ckm007 closed this Oct 23, 2026
@ckm007 ckm007 reopened this Oct 23, 2026
@ckm007
ckm007 merged commit 5f1f37c into mosip:develop Oct 23, 2026
30 of 32 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.

2 participants