Skip to content
ConfigHub for coding agents
Reference / docs/self-hosted-helm.md Source on GitHub

Self-hosting the ConfigHub hub in Kubernetes (Helm)

For a platform team that wants to run a ConfigHub hub inside their own Kubernetes cluster behind corporate OIDC single sign-on (Dex, Okta, Microsoft Entra ID, Keycloak, or GitHub OIDC; SAML works via an OIDC broker such as Dex or Keycloak) with persistent PostgreSQL storage, in-place Helm upgrades, and clean teardown.

A hub is a ConfigHub server and PostgreSQL database that stores configuration, the reason for each value, and an immutable record of who approved each change.

  Coding Agents / CI / Humans (cub CLI)          Corporate IdP (OIDC / SAML)
                 │                                            │
                 ▼                                            ▼
     ┌──────────────────────────────────────────────────────────────┐
     │  Ingress (TLS) ─▶ ConfigHub Hub Pod (:8080, non-root)        │
     │                        └── Embedded PostgreSQL (10 Gi PVC)   │
     └──────────────────────────────┬───────────────────────────────┘
                                    │  Approved revisions (1:1 or OCI)
                                    ▼
              Argo CD / Flux clusters  ·  Vercel / Fly / VMs

Install with Helm

The Helm chart is packaged in charts/confighub-hub/:

helm install confighub ./charts/confighub-hub \
  --namespace confighub --create-namespace \
  --set oidc.issuer=https://idp.internal.example.com/dex \
  --set oidc.audience=confighub-cli \
  --set ingress.enabled=true \
  --set ingress.hosts[0].host=confighub.internal.example.com

Key chart defaults:

  • Storage: 10 Gi PersistentVolumeClaim mounted at /var/lib/confighub for PostgreSQL data and hub state (persistence.enabled: true).
  • Security: Runs non-root (runAsUser: 1000, allowPrivilegeEscalation: false), listens on cluster-internal port 8080 behind your Ingress and TLS termination.
  • SSO: Sets CONFIGHUB_AUTH_ISSUER, CONFIGHUB_TOKEN_EXCHANGE_AUDIENCE, and optional CONFIGHUB_AUTH_JWKS_URL for corporate OIDC token exchange.

Operations, HA & sizing

  • Availability (single replica, not HA yet): The chart runs one hub pod with an embedded single-writer PostgreSQL PVC (strategy.type: Recreate; external PostgreSQL is not yet exposed via chart values). Expect brief downtime (seconds) during helm upgrade while the old pod releases the PVC and the new pod runs migrations.
  • Baseline sizing: Start with 1 vCPU, 1–2 GiB RAM, and the default 10 Gi PVC for a small-to-medium team (audit history and config revisions are compact text/JSON).
  • Backup, restore, and failed-upgrade rollback: Take scheduled snapshots of the confighub-confighub-hub-data PVC, or run pg_dump inside the pod before upgrades (kubectl -n confighub exec deploy/confighub-confighub-hub -- pg_dump -U confighub confighub > backup.sql). To restore after a failed migration, roll back the chart (helm rollback confighub -n confighub) and restore the PVC snapshot or replay backup.sql with psql. Export any app to plain files anytime with cub mini copy APP --variant live --to-dir DIR.
  • Supported identity providers (OIDC): Any OIDC-compliant IdP (Dex, Okta, Microsoft Entra ID, Keycloak, or GitHub OIDC) via oidc.issuer and oidc.audience (SAML is supported via an OIDC broker such as Dex or Keycloak).

Upgrade, back up, and remove

  • Upgrade in place (preserves PostgreSQL data and audit history):

    helm upgrade confighub ./charts/confighub-hub \
      --namespace confighub --reuse-values \
      --set image.tag=<NEW_TAG>

    The Deployment uses strategy.type: Recreate so the old pod releases the single-writer PostgreSQL PVC cleanly before the new pod starts and runs schema migrations.

  • Back up or export: Snapshot the PVC, run pg_dump in the pod, or export any app to plain files with cub mini copy APP --variant live --to-dir DIR.
  • Remove everything:

    helm uninstall confighub -n confighub
    kubectl -n confighub delete pvc confighub-confighub-hub-data

Security review and PR audit trail