Helm
Entrepot serves classic index.yaml chart repositories and a
ChartMuseum-compatible API, so helm repo add, helm cm-push and plain
curl all work. OCI charts (helm push oci://…) go to
Docker repositories instead.
| Kind | Behaviour |
|---|---|
| hosted | Stores charts at charts/<name>-<version>.tgz and generates index.yaml from them. Accepts PUT, the ChartMuseum API and provenance (.prov) files. |
| proxy | Caches an upstream chart repository, rewriting the chart URLs in its index.yaml so downloads are cached too. Charts blocked by a routing rule are filtered out of the index. |
| group | Merges the members’ indexes and prefers hosted charts (preferHosted). |
Create the repositories
Section titled “Create the repositories”api -X POST $E/api/v1/repositories -d '{"name":"helm-internal","format":"helm","kind":"hosted","blobStore":"default"}'api -X POST $E/api/v1/repositories -d '{"name":"helm-bitnami","format":"helm","kind":"proxy","blobStore":"default","proxy":{"remoteUrl":"https://charts.bitnami.com/bitnami"}}'api -X POST $E/api/v1/repositories -d '{"name":"helm","format":"helm","kind":"group","blobStore":"default","group":{"members":["helm-internal","helm-bitnami"]}}'Install charts
Section titled “Install charts”helm repo add internal https://entrepot.example.com/repository/helm/ \ --username token --password "$ENTREPOT_TOKEN"helm repo updatehelm search repo internal/helm install my-release internal/mychartChart URLs in index.yaml are relative (charts/<name>-<version>.tgz), so
Helm reuses the repository’s credentials for downloads.
Publish charts
Section titled “Publish charts”helm package ./mychartcurl -f --data-binary @mychart-0.1.0.tgz \ -H "Authorization: Bearer $ENTREPOT_TOKEN" \ https://entrepot.example.com/repository/helm-internal/api/chartsThe API also accepts multipart uploads with the fields chart and,
optionally, prov.
helm plugin install https://github.com/chartmuseum/helm-pushhelm repo add helm-internal https://entrepot.example.com/repository/helm-internal/ \ --username token --password "$ENTREPOT_TOKEN"helm cm-push mychart-0.1.0.tgz helm-internalThe API is also served at /api/repository/<repo>/charts, the multi-tenant
ChartMuseum layout cm-push uses by default for a repository URL with a
path.
curl -fu token:$ENTREPOT_TOKEN -T mychart-0.1.0.tgz \ https://entrepot.example.com/repository/helm-internal/charts/mychart-0.1.0.tgz# optional provenance filecurl -fu token:$ENTREPOT_TOKEN -T mychart-0.1.0.tgz.prov \ https://entrepot.example.com/repository/helm-internal/charts/mychart-0.1.0.tgz.provhelm registry login entrepot.example.com -u token -p "$ENTREPOT_TOKEN"helm push mychart-0.1.0.tgz oci://entrepot.example.com/docker-internal/chartsChartMuseum API
Section titled “ChartMuseum API”Method and path (below /repository/<repo>/) |
Purpose |
|---|---|
POST api/charts |
Upload a chart (raw body, or multipart chart + prov) |
POST api/prov |
Upload a provenance file |
GET api/charts |
All charts (JSON) |
GET api/charts/<name> |
Versions of a chart |
GET api/charts/<name>/<version> |
One version (latest allowed) |
DELETE api/charts/<name>/<version> |
Delete a version |
Uploading an existing version returns 409 unless hosted.allowRedeploy is
enabled.
From GitLab CI
Section titled “From GitLab CI”publish-chart: image: alpine/helm:3 id_tokens: ENTREPOT_ID_TOKEN: aud: https://entrepot.example.com script: - helm package ./chart --version "$CI_COMMIT_TAG" - 'curl -f --data-binary @$(ls *.tgz) -H "Authorization: Bearer $ENTREPOT_ID_TOKEN" https://entrepot.example.com/repository/helm-internal/api/charts' rules: - if: $CI_COMMIT_TAGTroubleshooting
Section titled “Troubleshooting”Error: looks like "…" is not a valid chart repository— the URL must end at the repository (…/repository/<name>/); Helm appendsindex.yaml.401onhelm repo add— pass--username/--password, or enableanonymousRead.- Charts from the proxy are missing — a routing rule may filter them out
of the proxied index, or the index is still cached
(
proxy.metadataTtlSeconds). helm cm-pushposts to the wrong URL — pass--context-path /repository/<name>if your plugin version doesn’t use the multi-tenant layout.