This project builds a devpi container image and provides a Helm chart that deploys it to Kubernetes with persistent storage and ingress-based access.
.
├── Containerfile # devpi server image (python:3.12-slim)
├── devpi-entrypoint.sh # idempotent devpi-init + devpi-server launcher
├── .github/workflows/build.yml # GHCR build/push workflow
└── chart/devpi/ # Helm chart
Build locally:
docker build -f Containerfile -t devpi .
docker run --rm -p 3141:3141 -v devpi-data:/data devpiThe server listens on port 3141 and stores everything in /data. devpi-init
runs automatically on first start; the data directory is reused on subsequent
starts.
.github/workflows/build.yml builds the image on every push/PR and pushes it to
ghcr.io/<owner>/<repo> on main and on v* tags (tags: branch name, semver,
latest, and a sha tag).
Install:
helm install devpi ./chart/devpi \
--set ingress.className=nginx \
--set ingress.hosts[0].host=devpi.example.com \
--set persistence.storageClass=longhorn \
--set persistence.size=10Gi \
--set devpi.rootPassword=changeme| Value | Default | Description |
|---|---|---|
ingress.enabled |
true |
Create an Ingress object |
ingress.className |
nginx |
IngressClass for the Ingress object |
ingress.hosts |
devpi.example.com |
Hosts/paths routed to devpi |
ingress.tls |
[] |
TLS secrets for the Ingress |
persistence.enabled |
true |
Mount a PVC at /data |
persistence.storageClass |
"" |
StorageClass; empty = cluster default |
persistence.size |
5Gi |
PVC size |
devpi.rootPassword |
"" |
Initial root password (first start only) |
devpi.existingSecret |
"" |
Existing secret with root-password key |
devpi.externalSecret.create |
false |
Sync the root password via External Secrets Operator |
devpi.externalSecret.secretStore |
SecretStore/user-ro |
SecretStore reference for the ExternalSecret |
devpi.externalSecret.refreshInterval |
1h |
Sync interval for the ExternalSecret |
devpi.externalSecret.remoteKey |
kv/team-cirrus/devpi |
Secret path in the external store |
devpi.externalSecret.remoteProperty |
root_password |
Key of the password within the remote secret |
devpi.extraArgs |
[] |
Extra devpi-server flags |
service.type |
ClusterIP |
Service type |
-
Keep
replicaCount: 1: devpi's server directory does not support concurrent writers. The defaultRecreatestrategy ensures the RWO volume detaches cleanly during rollouts. -
The root password only takes effect on the first start, when
devpi-initbootstraps/data. -
To source the root password from an external secret store (e.g. Vault via the External Secrets Operator), enable the ExternalSecret:
helm install devpi ./chart/devpi --set devpi.externalSecret.create=true
This creates an
ExternalSecretthat pulls the password fromkv/team-cirrus/devpi(keyroot_password) using the namespaced SecretStoreuser-ro, and projects it as aroot-passwordkey on a secret named after the release, which the Deployment consumes. -
Data survives restarts via the PVC; set
persistence.storageClassto a StorageClass backed by a CSI driver with a Reclaim/Bind policy that suits your environment.