Closes #1828 Volume mounting is not working if git local repo is selcted#1838
Conversation
… selcted Signed-off-by: abhishek-1809 <abhisahu1920@gmail.com>
… selcted Signed-off-by: abhishek-1809 <abhisahu1920@gmail.com>
WalkthroughThe changes migrate config-server from manual NFS PV wiring to CSI-based storage ( Changesconfig-server composite profile and CSI storage migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
helm/config-server/templates/secret.yaml (1)
12-15: ⚡ Quick winApply base64 encoding consistently, or remove the
elsebranch.Line 12 correctly uses
b64encfor the token, but line 14 omits it for the empty case. For semantic consistency with Kubernetes Secret data encoding, applyb64encto the empty string as well.Better yet, consider removing the
elsebranch entirely (lines 13-15), since the deployment template (lines 86-92 indeployment.yaml) only creates the environment variable when$repo.tokenexists. An empty secret key is never referenced and adds clutter.Recommended refactor
Option 1 (preferred): Remove the else branch
{{- range $index, $repo := .Values.spring_profiles.spring_compositeRepos }} {{- if $repo.token }} SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_PASSWORD: {{ $repo.token | b64enc | quote }} - {{- else }} - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_PASSWORD: "" {{- end }} {{- end }}Option 2: Apply b64enc consistently
{{- range $index, $repo := .Values.spring_profiles.spring_compositeRepos }} {{- if $repo.token }} SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_PASSWORD: {{ $repo.token | b64enc | quote }} {{- else }} - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_PASSWORD: "" + SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_PASSWORD: {{ "" | b64enc | quote }} {{- end }} {{- end }}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@helm/config-server/templates/secret.yaml` around lines 12 - 15, The SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_PASSWORD environment variable definition has an inconsistent else branch. Either remove the entire else branch (lines 13-15) since the deployment template only references this secret key when $repo.token exists and an empty string is never used, or if you prefer to keep the else branch, apply the b64enc filter consistently to the empty string on line 14 to match the encoding applied to the token on line 12.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@helm/config-server/templates/secret.yaml`:
- Around line 12-15: The SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index
}}_PASSWORD environment variable definition has an inconsistent else branch.
Either remove the entire else branch (lines 13-15) since the deployment template
only references this secret key when $repo.token exists and an empty string is
never used, or if you prefer to keep the else branch, apply the b64enc filter
consistently to the empty string on line 14 to match the encoding applied to the
token on line 12.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ad95d6eb-cd55-4bcc-970a-bc7df539c329
📒 Files selected for processing (7)
deploy/config-server/install.shdeploy/config-server/values.yamlhelm/config-server/templates/config-pv.yamlhelm/config-server/templates/config-pvc.yamlhelm/config-server/templates/deployment.yamlhelm/config-server/templates/secret.yamlhelm/config-server/values.yaml
💤 Files with no reviewable changes (1)
- helm/config-server/templates/config-pv.yaml
Summary by CodeRabbit
Chores