Allow multiple slashes in charts (OCI) #4739
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the change
After the analysis at #4284 (comment), I took some time to start fixing this issue.
This PR is the first step in doing so, but I haven't been able to fully test it IRL.
The changes are twofold:
repoName/what/ever/you/add/here
by escaping it likerepoName/what%2Fever%2Fyou%2Fadd%2Fhere
.oci://repositoryURL.....repoName/what/ever/you/add/here
Benefits
OCI charts with slashes as part of their names will work.
Possible drawbacks
N/A
Applicable issues
Additional information
The reason I'm leaving it as a draft is mainly that I haven't been able to fully test it. I added a "kube/apps" chart in a local Harbor instance, but the installation failed in Helm because it isn't supporting chart names having slashes, AFAIK?
Perhaps we need either a GCR env or someone jumping in testing it OR an alternative way to repro it.
What's more, I also wonder whether we have made this assumption (chart ids with two parts) in more places we should revisit.