helm repo add: Register Chart Repos in CI
Register a chart repository so charts can be installed by name.
helm repo add records a chart repository under a local alias. In CI you add the repos a deploy depends on, then run helm repo update to refresh the index before installing. Private repos take --username/--password (or a token).
Common flags
NAME URL- alias and repository URL (positional)--username/--password- credentials for private repos--force-update- overwrite an existing repo entry- helm repo update - refresh indexes after adding
Example in CI
Add a repo, refresh, then install from it.
shell
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm upgrade --install pg bitnami/postgresql -n dataCommon errors in CI
- Error: repository name (X) already exists - add --force-update or skip
- looks like "URL" is not a valid chart repository ... 404 - wrong URL or missing index.yaml
- Error: ... 401 Unauthorized - private repo needs credentials
Key takeaways
- Registers a chart repo so charts install by alias.
- Run helm repo update after adding to refresh the index.
- Use --force-update for idempotent re-runs in CI.
Related guides
helm install: Install Charts in CIInstall a Helm chart as a release in CI: values, namespace, and wait flags, an example, and the install error…
helm upgrade: Deploy Chart Changes in CIUpgrade a Helm release in CI with --install and --atomic: key flags, a deploy example, and the upgrade errors…
helm template: Render Manifests in CIRender a Helm chart to plain manifests in CI: values and output flags, a diff example, and the templating err…