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

parse index.yaml should use local cache #89

Closed
Tracked by #87
bjwswang opened this issue Jul 10, 2023 · 2 comments · Fixed by #108
Closed
Tracked by #87

parse index.yaml should use local cache #89

bjwswang opened this issue Jul 10, 2023 · 2 comments · Fixed by #108
Assignees
Labels
enhancement New feature or request priority-high
Milestone

Comments

@bjwswang
Copy link
Collaborator

bjwswang commented Jul 10, 2023

@zqq454224016 pls work with @Abirdcfly on this issue.

@Abirdcfly
Copy link
Member

Abirdcfly commented Jul 10, 2023

before #84, We are actually parsing the index.yaml file of the repo directly using go's http library, the code can be seen roughly as follows

func (c *chartmuseum) fetchIndexYaml() (*hrepo.IndexFile, error) {
.

After the #84 merge, we introduced the helm.sh/helm/v3 library, which actually behaves the same as the helm binary. When adding a new repository, the helm repo add command actually takes effect, the index.yaml file for the helm repository is already downloaded locally, and the helm.sh/helm/v3 library function provides functions to parse index.yaml, so we can use the helm.sh/helm/v3 library function directly, without having to use go's http library to parse it again.

@zqq454224016
Copy link
Collaborator

The file index.yaml exits in pah "helm env : HELM_REPOSITORY_CACHE". "helm env --repository-cache string" can change default path.

@bjwswang bjwswang added this to the v0.2.0 milestone Jul 14, 2023
@bjwswang bjwswang added enhancement New feature or request priority-high labels Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-high
Projects
None yet
3 participants