Skip piped-config volume when launcher loads config from git - #7141
Open
kishoredurai wants to merge 1 commit into
Open
Skip piped-config volume when launcher loads config from git#7141kishoredurai wants to merge 1 commit into
kishoredurai wants to merge 1 commit into
Conversation
When `launcher.enabled` and `launcher.configFromGitRepo.enabled` are both true, the launcher fetches piped config from a git repository and does not read `/etc/piped-config/`. The chart, however, unconditionally rendered the `piped-config` volume and volumeMount, so setting `config.create: false` produced an invalid Deployment (empty ConfigMap name). Guard the volume and volumeMount so they are only rendered when a local ConfigMap is actually consumed. Signed-off-by: kishoredurai <kishoredurai7@gmail.com>
Contributor
|
👋 Hi @kishoredurai, welcome to PipeCD and thanks for opening your first pull request! We’re really happy to have you here Before your PR gets merged, please check a few important things below. Helpful resources
DCO Sign-offAll commits must include a In case you forget to sign-off your commit(s), follow these steps: For the last commit: git commit --amend --signoff
git push --force-with-leaseFor multiple commits: git rebase --signoff origin/master
git push --force-with-leaseRun checks locallyBefore pushing updates, please run: make checkThis runs the same checks as CI and helps catch issues early. 💬 Need help?If anything is unclear, feel free to ask in this PR or join us on the CNCF Slack in the #pipecd channel. Thanks for contributing to PipeCD! ❤️ |
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 this PR does:
Only render the
piped-configConfigMap volume and volumeMount in the piped Deployment when a local ConfigMap is actually consumed. Specifically, skip them whenlauncher.enabledandlauncher.configFromGitRepo.enabledare both true — in that mode the launcher fetches piped config from git (via--config-from-git-repo=trueand the--git-*flags) and does not read/etc/piped-config/.Why we need it:
With
launcher.enabled: true+launcher.configFromGitRepo.enabled: true, the local ConfigMap is unused. Users naturally setconfig.create: falsein that mode, but that produces an invalid Deployment (emptyconfigMap.name) andhelm upgradefails:Which issue(s) this PR fixes:
Fixes #7140
Does this PR introduce a user-facing change?:
configFromGitRepocan now setconfig.create: falseand install the chart cleanly. All other modes (piped without launcher, and launcher with a local ConfigMap) render identically to before.Verification —
helm templatein three modes:piped-configvolume + mount present. ✓launcher.enabled=true,configFromGitRepo.enabled=false:piped-configstill present (launcher reads from mounted ConfigMap). ✓launcher.enabled=true+configFromGitRepo.enabled=true+config.create=false:piped-configabsent, launcher uses--git-*flags. ✓helm lint manifests/pipedpasses.