Add defaultRegistryURL and defaultRepoType for non-OCI HelmRepository support #239
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.
While working on figuring out what registry to use for CI in #220 I thought why not use Mirantis Secure Registry (MSR)?welp.. that was a journey.
Currently we hardcode the
HelmRepostory
type tooci
when reconciling the defaulthmc-templates
repository. The problem with this is, for whatever reason, MSR does not like OCI (even though, I'm pretty sure it implements the spec) and it results ininsufficient_scope
errors when we try to pull the charts. After some digging throughhelm-controller
CRDs and docs I discovered this setting: https://fluxcd.io/flux/components/source/helmrepositories/#type and changed ourHelmRepository
we reconcile to use'default'
which fixed the issue and pulled the chart with no problems.This patch renames the existing 'defaultOCIRegistry' flag and associated Helm values to 'defaultRegistryURL' and introduces a new type: 'defaultRepoType' which allows for modification of the previously hardcoded 'oci' type for chart repositories.