Scaling & high availability
Entrepot pods are stateless. All shared state lives in Postgres and the blob stores, and the in-process caches (repositories, role bindings, trust policies, verified tokens) hold only a few seconds of data. Scaling out is a matter of storage and configuration.
Requirements for more than one replica
Section titled “Requirements for more than one replica”| Requirement | Why |
|---|---|
| Every blob store is S3 or a ReadWriteMany volume (EFS, NFS, CephFS) | all replicas read and write the same content. The Helm chart refuses replicaCount > 1 with a ReadWriteOnce store. |
The same auth.sessionSecret on all replicas |
sessions and Docker registry tokens issued by one replica must be valid on the others. |
The same secrets.key (if set) on all replicas and scan workers |
every process must decrypt secrets stored in Postgres. |
server.baseURL set |
URLs in rewritten metadata and OIDC redirects must not depend on which pod answered. |
With the chart, set an explicit auth.sessionSecret or auth.existingSecret
— a generated secret would otherwise differ between upgrades.
What is safe to run concurrently
Section titled “What is safe to run concurrently”- Migrations take a Postgres advisory lock, so replicas can start at the same time.
- Chunked Docker uploads keep their chunks in the blob store’s temp area,
so consecutive
PATCHrequests can land on different pods — no sticky sessions needed. - Proxy misses are collapsed per process (singleflight); several replicas may fetch the same new artifact once each, which is harmless because content is addressed by digest.
- Cleanup runs under a cluster-wide lock, on one replica at a time.
- Scan jobs are claimed with
FOR UPDATE SKIP LOCKEDand leases, so any number of workers can run anywhere.
Example
Section titled “Example”replicaCount: 3auth: existingSecret: entrepot-authblobStores: - name: artifacts type: s3 s3: {bucket: my-entrepot-artifacts, region: eu-west-2, redirectDownloads: true}podDisruptionBudget: enabled: true minAvailable: 2autoscaling: enabled: true minReplicas: 3 maxReplicas: 8 targetCPUUtilizationPercentage: 75topologySpreadConstraints: - maxSkew: 1 topologyKey: topology.kubernetes.io/zone whenUnsatisfiable: ScheduleAnyway labelSelector: matchLabels: {app.kubernetes.io/name: entrepot}Sizing notes
Section titled “Sizing notes”- Postgres is the shared dependency: give it a highly available setup
(RDS Multi-AZ, CloudNativePG). Each replica opens up to
database.maxConnsconnections (default 20); multiply by replicas and scan workers when sizingmax_connections. - S3 with
redirectDownloadstakes large downloads off the pods entirely. Without it, bandwidth scales with the number of replicas. /tmp: uploads are spooled to the pod’s/tmpemptyDir while they are hashed. Sizetmp.sizeLimitfor your largest artifacts times concurrent uploads.- Scan workers are CPU- and memory-hungry while scanning images; run them
as a separate Deployment (
scanning.worker.enabled) so they scale independently and never starve the API. A shared Trivy server (scanning.trivyServer.enabled) keeps a single vulnerability DB. - Ingress timeouts must allow slow uploads of large layers; see Ingress.