Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correctly copy Helm charts in init container (#1018)
During upgrades the init container was incorrectly copying the whole directory, instead of just the tars. ``` # bundles directory in the container $ ls /helm-charts/bundles/ charts helm-charts-v0.14.6.tar helm-charts-v0.14.9.tar helm-charts-v0.23.1.tar # incorrectly nested directory with the new charts $ ls /helm-charts/bundles/charts/ helm-charts-v0.14.6.tar helm-charts-v0.14.9.tar helm-charts-v0.25.0.tar ``` **What problem does this PR solve?**: **Which issue(s) this PR fixes**: Fixes # **How Has This Been Tested?**: <!-- Please describe the tests that you ran to verify your changes. Provide output from the tests and any manual steps needed to replicate the tests. --> The file gets copied correctly when the directory does not exist: ``` $ cp -r charts/ dst/ $ ls dst foo.tar ``` When the dir already exists (ie upgrade scenario), the whole directory gets copied: ``` $ mkdir dst $ cp -r charts/ dst/ $ ls dst charts ``` Copying the file works correctly into an existing dst if using .: ``` $ mkdir dst $ cp -r charts/. dst/ $ ls dst foo.tar ``` **Special notes for your reviewer**: <!-- Use this to provide any additional information to the reviewers. This may include: - Best way to review the PR. - Where the author wants the most review attention on. - etc. -->
- Loading branch information