generated from d2iq-archive/golang-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Support published Helm charts with different name format (#695)
Currently `mindthegap create helm-bundle` fails if the chart published in the helm repo has a different name to the expected format `<chartName>-<chartVersion>.tgz`. An example that hit this issue is the NFD chart that is published with the name `<chartName>-chart-<chartVersion>.tgz`. This commit fixes the issue by first finding the download URL from the Helm repo index and then using the existing `GetChartFromURL` function to download the chart. This already correctly uses the basename of the published chart file and hence doesn't hit the above issue. Tested to be working: ```bash $ cat repos.yaml repositories: nfd: repoURL: https://kubernetes-sigs.github.io/node-feature-discovery/charts/ charts: node-feature-discovery: - 0.15.2 $ ./dist/mindthegap_darwin_arm64/mindthegap create helm-bundle --helm-charts-file=repos.yaml --overwrite ✓ Parsing Helm chart bundle config ✓ Creating temporary OCI registry directory ✓ Starting temporary OCI registry ✓ Creating temporary chart storage directory ✓ Fetching Helm chart node-feature-discovery (versions [0.15.2]) from nfd (https://kubernetes-sigs.github.io/node-feature-discovery/charts/) ✓ Archiving Helm charts to helm-charts.tar $ ./dist/mindthegap_darwin_arm64/mindthegap serve bundle --bundle helm-charts.tar & ✓ Creating temporary directory ✓ Unarchiving image bundle "helm-charts.tar" ✓ Parsing Helm charts bundle config ✓ Creating Docker registry Listening on 127.0.0.1:58639 $ crane ls 127.0.0.1:58783/charts/node-feature-discovery 0.15.2 ```
- Loading branch information
1 parent
c00edff
commit 1313f8c
Showing
4 changed files
with
71 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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