chartmuseum

by QuenchWorks

Helm chartv0.0.13App 0.16.6Apache-2.0Verified publisher

ChartMuseum, an HTTP server for Helm chart repositories, with a pluggable storage backend (local disk, S3, GCS, Azure, and more). Hardened by QuenchWorks as a minimal, nonroot, CVE-gated image, cosign-signed and pinned by digest.

About this chart

Quenchworks ChartMuseum

Hardened ChartMuseum, an HTTP server that turns a storage backend into a Helm chart repository, running as a Deployment that serves the repository (and the optional write API) on port 8080. Built from source on a minimal, nonroot, CVE-gated image that runs on a read-only root filesystem with all capabilities dropped. The image is cosign-signed (keyless / Sigstore) and the chart pins it by the signed digest, never a tag.

⚠️ The default install accepts anonymous writes

api.enabled defaults to true (ChartMuseum's own default) and auth.username defaults to empty. That combination means every /api route is unauthenticated: anyone who can reach the Service can publish a chart —

curl --data-binary @evil-1.0.0.tgz http://<service>:8080/api/charts

— and, unless api.disableDelete=true, delete existing ones. That is convenient for a throwaway namespace and wrong for anything else. Pick one before you expose this outside a trusted network:

# 1. read/write with HTTP basic auth (anonymous pulls still allowed)
helm install museum oci://ghcr.io/quenchworks/charts/chartmuseum \
  --set auth.username=publisher --set auth.password='<strong-password>' \
  --set auth.anonymousGet=true

# 2. read-only repository, no write API at all
helm install museum oci://ghcr.io/quenchworks/charts/chartmuseum \
  --set api.enabled=false

networkPolicy.allowExternal is true by default (a chart repo is normally pulled from everywhere); set it to false to confine clients to the release namespace. The chart also warns about this in its post-install NOTES.

Install

helm install museum oci://ghcr.io/quenchworks/charts/chartmuseum

That gives you local-disk storage on an 8Gi PersistentVolumeClaim. Use it as a repository over a port-forward:

kubectl port-forward svc/museum-chartmuseum 8080:8080
curl http://127.0.0.1:8080/health                      # {"healthy":true}
helm repo add museum http://127.0.0.1:8080
curl --data-binary @mychart-0.1.0.tgz http://127.0.0.1:8080/api/charts
curl http://127.0.0.1:8080/api/charts

With basic auth configured, helm repo add takes --username/--password and uploads take curl -u user:pass.

Storage backends

storage.backend is passed straight to ChartMuseum's --storage and accepts local, amazon, google, microsoft, oracle, alibaba, openstack, baidu, tencent, and etcd.

Only local is wired end-to-end by this chart, because it is the only backend that needs a Kubernetes volume: the chart provisions it (persistence) and mounts it at storage.local.path. Every other backend is credentials plus a bucket, which ChartMuseum reads from flags and environment variables — so they go through extraArgs and extraEnvVars rather than a bespoke value per cloud:

storage:
  backend: amazon
persistence:
  enabled: false          # no local disk needed; the mount becomes an emptyDir
extraArgs:
  - --storage-amazon-bucket=my-charts
  - --storage-amazon-region=eu-west-1
  - --storage-amazon-prefix=prod
extraEnvVarsSecret: chartmuseum-aws   # AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY

The full flag list (--storage-google-bucket, --storage-microsoft-container, --storage-oracle-bucket, …) is chartmuseum --help in the same image:

docker run --rm ghcr.io/quenchworks/images/chartmuseum:0.16.6 --help

With any shared object store you may raise replicaCount or enable autoscaling; with local you must not (see Architecture).

Verify the image

cosign verify ghcr.io/quenchworks/images/chartmuseum \
  --certificate-identity-regexp 'https://github.com/quenchworks/.+' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

Each build also ships an SPDX SBOM and SLSA build provenance as attestations. Verify them with the GitHub CLI:

gh attestation verify oci://ghcr.io/quenchworks/images/chartmuseum \
  --owner quenchworks

Values

KeyDefaultNotes
image.repositoryghcr.io/quenchworks/images/chartmuseum
image.digest(CI-written)Required. Charts pin by digest, never a tag.
image.pullPolicyIfNotPresentAlways, IfNotPresent, or Never.
nameOverride""Override the chart name in resource names.
replicaCount1Keep at 1 with the local backend (ReadWriteOnce, per-pod).
api.enabledtrueAll /api routes, including upload and delete. Anonymous unless auth is set.
api.allowOverwritefalseRe-upload an existing chart version without ?force.
api.disableDeletefalseKeep uploads but drop the DELETE route.
auth.username""HTTP basic auth user. Empty means no auth at all.
auth.password""Required when auth.username is set; stored in a chart-managed Secret.
auth.existingSecret""Take the credentials from a Secret you manage instead.
auth.existingSecretUserKeybasic-auth-userKey in auth.existingSecret holding the username.
auth.existingSecretPasswordKeybasic-auth-passKey in auth.existingSecret holding the password.
auth.anonymousGetfalseWith auth on, still allow unauthenticated pulls and index.yaml.
storage.backendlocallocal, amazon, google, microsoft, oracle, alibaba, openstack, baidu, tencent, etcd.
storage.local.path/storageMount point and --storage-local-rootdir.
persistence.enabledtruePVC for chart storage. When false, the mount is an emptyDir (charts lost on restart).
persistence.size8GiRequested volume size.
persistence.storageClass""Default class if unset.
persistence.accessModes["ReadWriteOnce"]PVC access modes.
persistence.annotations{}Annotations on the PVC.
persistence.existingClaim""Bind an externally-managed PVC instead of provisioning one.
contextPath""Serve under a base path, e.g. /charts (--context-path).
chartUrl""Absolute URL for the .tgz links in index.yaml. Set it behind an Ingress or proxy.
extraArgs[]Extra flags appended to the chartmuseum command (backend bucket/region flags live here).
resources.requestscpu 50m / mem 64MiCPU / memory requests.
resources.limitscpu 500m / mem 512MiCPU / memory limits.
service.typeClusterIPClusterIP, NodePort, or LoadBalancer.
service.port8080Repository and API.
service.httpsPort443Service port for the TLS listener (container 8443) when tls.enabled.
tls.enabledfalseServe HTTPS on ChartMuseum's own listener; the certificate is mounted at /tls.
tls.existingSecret""Use this kubernetes.io/tls Secret (1st choice).
tls.certManager.enabledfalseRequest a cert-manager Certificate from tls.certManager.issuerRef (2nd choice).
tls.selfSigned.validityDays365Otherwise Helm generates a CA + certificate, kept across upgrades.
autoscaling.enabledfalseHPA on CPU (autoscaling/v2). Only safe with a shared object-storage backend.
autoscaling.minReplicas1
autoscaling.maxReplicas5
autoscaling.targetCPUUtilizationPercentage80
serviceAccount.createtrueToken automount is off.
serviceAccount.name""Use an existing ServiceAccount if set.
serviceAccount.annotations{}Annotations on the ServiceAccount.
rbac.createfalseMinimal Role/RoleBinding.
networkPolicy.enabledtrueRestricts ingress.
networkPolicy.allowExternaltrueSet false to restrict ingress to the release namespace.
podDisruptionBudget.enabledtrue
podDisruptionBudget.minAvailable1
ingress.enabledfalseCreate an Ingress. With tls.enabled it routes to 443: set the controller's backend protocol to HTTPS.
ingress.className""IngressClass to claim it. Empty leaves it unset, so the cluster default applies.
ingress.annotations{}Controller annotations (rewrite targets, body size, cert-manager issuer, ...).
ingress.servicePortnullBackend port. Unset resolves service.port, then service.ports.http / .https.
ingress.hosts[]e.g. [{host: charts.example.com}]. A host with no paths gets a single / Prefix path.
ingress.tls[]Standard Ingress TLS list, e.g. [{hosts: [charts.example.com], secretName: charts-tls}].

P

Deploy chartmuseum with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has chartmuseum on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartchartmuseum is pinned at v0.0.13 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply