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

Update dependency repository when relocating #67

Open
PhilKershaw opened this issue Apr 22, 2024 · 3 comments
Open

Update dependency repository when relocating #67

PhilKershaw opened this issue Apr 22, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@PhilKershaw
Copy link

Is your feature request related to a problem? Please describe.

When relocating a Helm Chart with one of more dependencies the repository for said dependencies is not updated to the new location in the parent Chart.yaml. Meaning when installing the newly relocated parent chart it still pulls the original dependencies that contain the original image references.

Describe the solution you'd like

When relocating/unwrapping to a new repository the dependency repository references in Chart.yaml are updated to the new location. Thus, referencing the relocated subcharts that have references to the relocated images.

Describe alternatives you've considered

Besides manual intervention, no other alternatives considered.

Additional context

No response

@PhilKershaw PhilKershaw added the enhancement New feature or request label Apr 22, 2024
@beltran-rubo
Copy link
Contributor

Hi @PhilKershaw

The references to the sub-charts into the Chart.yaml are used mainly for 'pacakging' a new Helm chart. The scenario that Helm dt took into account is to have all the dependant Helm charts inside the "charts/" folder inside the main one.

When installing the main chart, the the dependant charts installed comes from the local directory "charts/" that have been modified to use the proper registry.

Are you bundling the Helm charts with the 'helm pack' command before running the 'helm dt' tool?

@PhilKershaw
Copy link
Author

Hi @beltran-rubo

Thanks for sharing the thinking behind the approach. I totally understand and in practice it mostly works out.

Would there be any value in enabling an option to relocate dependency Helm Charts separately and not expecting them to be bundled? This would reduce duplication on the target registry side and possibly other benefits that don’t occur to me right now.

To your question RE running helm pack before dt. As part of a relocation procedure I run helm dep build which pulls the archive files before running helm dt wrap which would pulls down the images. There is a slight issue with this flow in that I have to extract the archives before helm dt wrap will run. It’s not a big issue but could perhaps be a little cleaner.

@beltran-rubo
Copy link
Contributor

helm dt relies on the immutability of the images & dependencies so it is able to redistribute and verify the copy was done properly. In that case it requires the subcharts are already part of the chart (and part of the Chart.lock file).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants