Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correctly copy Helm charts in init container #1018

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,18 @@ spec:
initContainers:
- name: copy-charts
image: "{{ .Values.helmRepository.images.bundleInitializer.repository }}:{{ default $.Chart.AppVersion .Values.helmRepository.images.bundleInitializer.tag }}"
command: ["/bin/cp", "-r", "/charts/", "/helm-charts/bundles/"]
# Copy the charts bundled in the image to the mounted PVC.
# The combination of flags `--recursive --no-target-directory` ensure that the bundled directory contents only are copied to the destination,
# rather than copying the source directory itself to the destination, which would lead to incorrect nesting.
# See https://unix.stackexchange.com/a/94838 for further explanation.
# Globs cannot be used here because we are not running in a shell and `cp` does not natively support globbing.
command:
- /bin/cp
- --recursive
- --no-target-directory
- --verbose
- /charts/
- /helm-charts/bundles/
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
volumeMounts:
- name: charts-volume
Expand Down
Loading