Quader Docs 0.176.0

How Quader runs

One image runs as several roles, each in Deployments of its own, and keeps every piece of state in PostgreSQL, Valkey and object storage.

On this page
The roles and their DeploymentsThe ingress controller sends the UI, the management API, sign-in and the documentation to the api pods and the package protocols and files to the packages pods. The worker pods run the background jobs and call the scanner pods, which read images and blobs from the scan listener of packages. Every role but the scanner keeps its state in PostgreSQL, Valkey and the object store; the migration Job reaches PostgreSQL only./ui/ /api/v1/ /auth/ /docs//api/<format>/ /v2/ /files/mutual TLSscan listener :8082Ingresscontrollerapi · 2 podspackages · 3podsworker · 2 podsscanner podsTrivy, ClamAVPostgreSQL ·Valkey · objectstoreJob migrate

One binary, several roles

quader serve --role <role> (or process.role) sets what a process does; the role has no default, and the chart sets it per Deployment.

Role Runs Chart
api The UI, the management API, sign-in, the CI token exchange and the documentation; holds the sessions and the sign-in secrets; queues background work but runs none Deployment <fullname>-api, 2 pods
packages The package protocols and /files/, for tokens only (a session cookie counts as absent); fills remote repositories from their upstreams; the scan listener Deployment <fullname>-packages, 3 pods
worker The background jobs: garbage collection, deletions, retention, the advisory sync, mirror passes, the scans; no client port Deployment <fullname>-worker, 2 pods
scanner Wraps Trivy or ClamAV for the worker; holds no database, Valkey or object-store credential <fullname>-vuln-scanner-trivy, <fullname>-malware-scanner-clamav, <fullname>-malware-updater-freshclam, while the scanning is on
web, all Several roles in one process, for development and tests; each logs a warning at start Never

A path the role does not serve answers 404, as any unknown path. A pool is a further Deployment of a role for some paths (api.pools, packages.pools) or job queues (worker.pools); an endpoint can have one too (Endpoints and exposure).

The other commands of the binary: quader migrate up and status (Upgrade), quader admin … (Install) and quader backup … (Backup and restore).

The dependencies

The chart installs none of them. A pod keeps nothing on its own disk but an ephemeral spool and /tmp.

Service Holds Without it
PostgreSQL 16 or later Everything that is not file content: repositories, packages, users, tokens, policies, the audit journal, the job queue, the change log that keeps the replicas' caches in step Replicas turn unready after health.database_outage_grace and answer 503
Valkey 9.0 or later, with Sentinel Rate-limit counters, fetch locks, the negative cache of upstream misses, cache evictions: never the only copy of anything Quader keeps serving, slower: limits per replica, evictions through PostgreSQL's change log
S3-compatible object storage The content of every file, stored once under its SHA-256 digest Uploads and downloads fail

Every connection to them runs TLS and verifies the server (TLS and certificates).

Any replica, any request

No api or packages replica keeps state a later request needs, so the Services spread requests at random, without session affinity; do not add affinity at the ingress controller. Each replica follows PostgreSQL's change log and drops a cached value another replica made stale: a revoked token stops working everywhere within auth.revocation_bound. Workers claim jobs under leases; a job whose worker vanishes is taken by another when the lease runs out.

Start and stop

A replica opens the ops listener (:8081, Endpoints and exposure) first and stays unready until PostgreSQL answers, the schema matches its binary, its TLS material and the object store were checked and its client listeners are bound. A replica that loses PostgreSQL stays alive and unready and keeps trying.

On SIGTERM a replica turns unready at once, serves on for health.shutdown_drain_delay so the ingress drops it, finishes what is in flight and exits within the pod's grace period (120 s for api and packages, 300 s for worker). A node drain or a rolling restart fails no request.

The migration Job

The schema is versioned with the binary. Before every install and upgrade the chart runs quader migrate up as the Job <fullname>-migrate; the Deployments change only after it succeeds. The Job reaches PostgreSQL only and opens no listener. A replica whose schema is behind its binary stays unready; one whose schema needs a newer binary exits with schema requires Quader >= <version>.

What the chart deploys

Besides the Deployments, the chart renders the Services <fullname>-api, <fullname>-packages and <fullname>-ops and the ConfigMap <fullname>-config (quader.yaml from the value config). It adds a ServiceAccount without a Kubernetes token, a PodDisruptionBudget and a NetworkPolicy of ingress rules per Deployment, and a cert-manager Certificate per kind of pod. On request: the Ingress, a Gateway API HTTPRoute, a HorizontalPodAutoscaler per role, the Prometheus operator's ServiceMonitor and alert rules, the backup CronJob and a set per further endpoint. It never deploys PostgreSQL, Valkey, the object store, the ingress controller or a Secret. The pods run as non-root with a read-only root file system, under the restricted Pod Security Standard. Every value is in Helm values.