Allow oci://
protocol to be specified for OCI AppRepositories
#6645
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
When OCI support was added originally, we required people to specify an http/https URL for the registry, even though Helm itself allows oci://, because we're (Kubeapps) actually interacting with the OCI distribution spec in that code.
In addition, there was an issue in the dashboard that even if you did specify
oci://registry-1.docker.io/foo
the dashboard would assume the URI was missing a protocol since it doesn't start withhttp
and add it, resulting inhttps://oci://registry-1.docker.io/foo
.This PR fixes the dashboard issue (so you can specify an oci protocol), updates the validation in the kubeapps-apis to use https in that case, and the sync code to do the same.
Benefits
Users can specify the OCI registry the way they would with Helm or other tools (this actually tripped up someone trying it out recently).
Possible drawbacks
Bugs?
Applicable issues
oci://
as the protocol when adding an OCI registry/namespace source #6427