Closed verhyppo closed 4 years ago
Hi. Yes, you are absolutely right about hardcoded in index.yaml, but it was done for certain reasons. So, I can give you advice about your problem. You have NXRM URL and uploaded index.yaml from the repo, so you can get a chart and concatenate nxrm_url + chart and it will be URL that you need
Many thanks for your advice, this is the same solution that I had in mind. Since there is a reason behind the actual implementation in the plugin, I think is ok to close here the issue, can you please briefly explaining the reasons behind?
Thanks for the effort in this plugin, it's very appreciated!
Thanks for your interesting. The main reason. If NXRM moves to another host, metadata will be invalid, I mean URLS in index.yaml. We can implement this behavior, but this implementation requires the following behavior from NXRM. NXRM has to recalculate all metadata after launch. I guess concatenate NXRM_url + chart_name_version will be much easier than implementation with metadata recalculate. Also, I found the same issue https://github.com/sonatype-nexus-community/nexus-repository-helm/issues/1
When retrieving the
index.yaml
from hosted or proxy repositories,urls
for entries contains only the artifact name. The actual behaviuor should be similar to:this result on helm charts repository is usually achieved using the following command:
helm repo index <local-repo-folder> --url https://<host and path for chart repository>/
This way, the index is generated prepending--url
value to all charts in theurls
field of theindex.yaml
What are you trying to do? I'm using helm plugin as hosted repository on one nexus instance. I also would like to download charts using http, first retrieving the
index.yaml
and then use (one of) the urls field to download thetar.gz
file.What feature or behavior is this required for? In order to retrieve the full url to download the chart via http
How could we solve this issue? (Not knowing is okay!)
It seems that url are generated statically by
org.sonatype.repository.helm.internal.createindex.CreateIndexServiceImpl#createListOfRelativeUrls
that does not take host url. Also, it seems that there is no host configuration in the administration panel to allow also the use of proxy pass.