distribution

by QuenchWorks

Helm chartv0.0.24App 3.1.2Apache-2.0Verified publisher

The CNCF reference OCI and Docker registry server for storing and distributing container images and other OCI artifacts. Hardened by QuenchWorks as a minimal, nonroot, CVE-gated image, cosign-signed and pinned by digest.

About this chart

Quenchworks Distribution

Hardened Distribution, the CNCF reference OCI/Docker registry server for storing and distributing container images and other OCI artifacts, on a minimal, nonroot, CVE-gated image built from source on Wolfi, cosign-signed and pinned by digest. Runs as a single-replica StatefulSet with a persistent blob store at /var/lib/registry and the registry HTTP API on port 5000.

Install

helm install registry oci://ghcr.io/quenchworks/charts/distribution

Check it from a client pod:

kubectl run reg-check --rm -it --restart=Never --image=ghcr.io/quenchworks/images/busybox -- \
  wget -qS -O- http://registry-distribution:5000/v2/

Grow the blob store and pick a storage class:

helm install registry oci://ghcr.io/quenchworks/charts/distribution \
  --set persistence.size=50Gi \
  --set persistence.storageClass=fast-ssd

Verify the image

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

Each build also ships an SPDX SBOM and SLSA provenance attestation. Verify them with gh attestation verify oci://ghcr.io/quenchworks/images/distribution --owner quenchworks.

Values

KeyDefaultNotes
image.repositoryghcr.io/quenchworks/images/distribution
image.digest(CI-written)Required. Charts pin by digest, never a tag.
image.pullPolicyIfNotPresent
nameOverride""Override the chart name in resource names.
replicaCount1Filesystem storage is single-writer; scale-out needs shared storage.
config.configYmlfilesystem on the PVC, API on :5000The full registry config.yml, mounted from a ConfigMap over /etc/distribution/config.yml.
config.existingConfigMap""Use your own ConfigMap (key config.yml) instead; wins over configYml.
persistence.enabledtrueBlob store volume at /var/lib/registry.
persistence.size10GiPVC size.
persistence.storageClass""Default class if unset.
persistence.accessModes["ReadWriteOnce"]
persistence.existingClaim""Use an existing PVC instead of a volumeClaimTemplate.
persistence.annotations{}PVC annotations.
persistence.selector{}PVC selector.
resources.requestscpu 100m / mem 128Mi
resources.limitscpu 1 / mem 512Mi
service.typeClusterIPClusterIP, NodePort, or LoadBalancer.
service.port5000Registry HTTP API.
service.httpsPort443Service port for the TLS listener (container 8443) when tls.enabled.
tls.enabledfalseServe HTTPS on Distribution'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.
serviceAccount.createtrueToken automount is off.
serviceAccount.name""Use an existing ServiceAccount.
rbac.createfalseMinimal Role/RoleBinding.
networkPolicy.enabledtrueRestricts ingress.
networkPolicy.allowExternaltrueSet false to restrict ingress to the release namespace.
podDisruptionBudget.enabledtrueminAvailable: 1.
ingress.enabledfalseCreate an Ingress for this chart. With tls.enabled it routes to service.httpsPort: 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: app.example.com}]. A host with no paths gets a single / Prefix path.
ingress.tls[]Standard Ingress TLS list, e.g. [{hosts: [app.example.com], secretName: app-tls}].

Plus the shared quench-common knobs (scheduling, probes, sidecars, init containers, extra env/volumes, security contexts, update strategy).

Architecture

A single registry runs as a StatefulSet so its blob store keeps a stable identity and a persistent volume. The default config.configYml uses the filesystem storage backend rooted at /var/lib/registry (the PVC), an in-memory blob descriptor cache, and serves the registry API on :5000 with the storagedriver health check enabled. Liveness and readiness both httpGet /v2/ (the registry API base returns 200 once ready). The container runs nonroot on a read-only root filesystem: the blob store PVC and a /tmp emptyDir are the only writable paths, and the config is mounted read-only. When persistence.enabled=false the data volume falls back to an emptyDir (ephemeral — for the CI install gate).

Configuration examples

Switch to S3 blob storage and keep the health check:

config:
  configYml: |
    version: 0.1
    log:
      level: info
    storage:
      s3:
        region: us-east-1
        bucket: my-registry
        rootdirectory: /
      cache:
        blobdescriptor: inmemory
    http:
      addr: :5000
    health:
      storagedriver:
        enabled: true
        interval: 10s
        threshold: 3

Bring your own config ConfigMap (managed outside the chart, key config.yml):

config:
  existingConfigMap: my-registry-config

Uninstall

helm uninstall registry

StatefulSet PVCs are not deleted with the release. Remove the blob store explicitly if you no longer need it:

kubectl delete pvc -l app.kubernetes.io/instance=registry

Notes

The chart depends on the quench-common library chart, pulled from oci://ghcr.io/quenchworks/charts/quench-common. The container runs as nonroot on a read-only root filesystem with all capabilities dropped, and the image is pinned by digest. Filesystem storage is single-writer, so keep replicaCount: 1 unless you switch config.configYml to a shared backend (S3/GCS). Distribution serves the registry API without authentication by default — enable auth/TLS in config.configYml and keep the NetworkPolicy as the trust boundary before exposing it beyond the cluster.

Deploy distribution with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has distribution 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 chartdistribution is pinned at v0.0.24 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