Details of Helm charts with a slash in the chart-name cannot be displayed #5897
Labels
component/apprepository
Issue related to kubeapps apprepository
kind/bug
An issue that reports a defect in an existing feature
Milestone
Describe the bug
When using Harbor as a helm repository for charts in a Harbor project, Harbor provides two possible URLs for the Helm index.yaml repository index:
The project specific endpoint works fine in Kubeapps, but if a user uses the single endpoint for all charts on the harbor instance, then the chart names are listed in the
index.yaml
file in the format<project-name>/<chart-name>
.These get sync'd to the Helm backend's postgresql database with IDs in the form
<repo-name>/<project-name>/<chart-name>
, whereas when retrieving the charts, Kubeapps looks for<repo-name>/<project-name>%2F<chart-name>
(that is, the chart-name, from Kubeapps' perspective, should not contain any slashes). This was a decision made when the OCI repository support was added, as chart names include slashes in that case also, which are encoded so the single slash divides the kubeapps repo and the full chart name.We should update the chart-sync for helm charts to ensure chart names with slashes are also encoded.
In the mean-time, the person who experienced this issue, is using the project-specific URL instead.
To Reproduce
Steps to reproduce the behavior:
If you check the api-server logs, you can verify Kubeapps is correctly looking for, for example,
harbor-test/kubeapps%2Fnginx
(ie. only a single slash between the repo and chart name, the the complete chart name being encoded), whereas if you check the database table you'll find the chart ID in the DB isharbor-test/kubeapps/nginx
.Expected behavior
The normal chart details are displayed.
The text was updated successfully, but these errors were encountered: