feat: custom url override for Helm AddOns#1504
Conversation
|
What's the plan for changing the chart values? We're using it mostly to generate the |
| repoURLOut = repoURL | ||
| chartNameOut = chartName | ||
| if !strings.HasPrefix(repoURL, "oci://") { | ||
| return |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
File is not properly formatted (gofumpt)
This is done to support custom CSI image uploaded to harbor.eng.nutanix.com for testing ahvMetro clusters. |
|
None of our customers use the helm install method. It also seems like the helm install is mostly for development. |
cfb8b1b to
4b49b44
Compare
How it works
Resolution order
For each addon, the repository URL is chosen in this order:
helmAddonsOverrides.<addonKey>.repositoryURL, that value is used.helmRepository.enabledis true and there is no override, the chart is pulled from the in-cluster Helm repository:oci://helm-repository.<namespace>.svc/charts.https://nutanix.github.io/helm-releases/for Nutanix CSI).So: override > internal OCI > default HTTPS.
OCI support
Charts can be pulled from OCI registries (e.g. Harbor) using
oci://URLs. CAREN supports this in two ways:Full path:
oci://harbor.example.com/project/nutanix-csi-storageCAREN normalizes this to a base URL + chart name when creating the HelmChartProxy, so the Cluster API Helm addon provider can run
helm pull oci://...correctly.Base URL:
oci://harbor.example.com/projectUsed as-is; the chart name comes from the addon’s default (e.g.
nutanix-csi-storage).For private OCI registries, ensure the workload cluster can authenticate (e.g.
helm registry loginor image pull secrets as required by your setup).Where to add a custom URL
When installing CAREN via Helm
Set
helmAddonsOverridesin the Helm values. The keys are the addon keys (same as in the helm-config ConfigMap).Example: Nutanix CSI from Harbor OCI (QA)
Example: Override multiple addons
Install command example
helm upgrade --install caren caren/cluster-api-runtime-extensions-nutanix \ --namespace caren-system \ --create-namespace \ --set helmAddonsOverrides.nutanix-storage-csi.repositoryURL="oci://harbor.eng.nutanix.com/k8s-ha/nutanix-csi-storage" \ --waitOr use a values file:
Addon keys (where to add custom URL)
Use these keys under
helmAddonsOverridesto override the repository URL for each addon:nutanix-storage-csinutanix-ccmaws-ccmaws-ebs-csiaws-load-balancer-controllerciliumcluster-autoscalercncf-distribution-registrycosi-controllerkonnector-agentlocal-path-provisioner-csimetallbmultusnfdregistry-syncersnapshot-controllertigera-operatorFlow summary
helmAddonsOverrides.<addonKey>.repositoryURL(and/or install with a values file that contains it).RepositoryURLvia thecaren.helmAddonRepoURLhelper (override → internal OCI → default).HelmChartProxyper addon per cluster. For OCI URLs, it normalizes full paths to base URL + chart name so the Cluster API Helm addon provider can pull the chart correctly.helm pull/ install using the resolved URL and chart name.This is how a custom URL (including OCI Harbor for nutanix-csi) is applied end-to-end.