centrifugo

by QuenchWorks

Helm chartv0.0.24App 6.10.3Apache-2.0Verified publisher

Centrifugo, the scalable real-time messaging server (WebSocket, SSE, HTTP-streaming, GRPC) with JWT auth, an admin UI, and a server HTTP API. Hardened by QuenchWorks as a minimal, nonroot, CVE-gated image, cosign-signed and pinned by digest.

About this chart

Quenchworks Centrifugo

Hardened Centrifugo on a minimal, nonroot, CVE-gated image, pinned by digest. Centrifugo is a scalable real-time messaging server speaking WebSocket, SSE, HTTP-streaming and GRPC, with JWT auth, an admin UI, and a server HTTP API.

Install

helm install messaging oci://ghcr.io/quenchworks/charts/centrifugo

The server runs nonroot with the in-memory engine and serves the client endpoints, the admin UI, the HTTP API and /health on container port 8000; the Service exposes it on the same port. Check health over a port-forward:

kubectl port-forward svc/messaging-centrifugo 8000:8000
curl http://127.0.0.1:8000/health

Verify the image

cosign verify ghcr.io/quenchworks/images/centrifugo \
  --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/centrifugo --owner quenchworks.

Engine (stateless vs scale-out)

By default the chart runs a single-replica Deployment with the in-memory engine: fully stateless, no Redis required. Presence/history/PUB-SUB are not shared across pods, so keep replicaCount: 1.

For horizontal scale-out switch to the Redis engine and point it at your Redis:

engine:
  type: redis
replicaCount: 3
extraEnvVars:
  - name: CENTRIFUGO_ENGINE_REDIS_ADDRESS
    value: "redis://redis-master.default.svc.cluster.local:6379"

Secrets

Centrifugo needs a token HMAC secret (verifies client JWTs), an HTTP API key, and: for the admin UI, an admin password and admin secret. The chart provisions all four in a managed Secret: each is generated if left empty and preserved across helm upgrade via a lookup, so upgrades never rotate live credentials. Set any secrets.* value explicitly to control it; rotate in production by updating the value and upgrading. Point secrets.existingSecret at your own Secret (keys mapped via secrets.keys.*) to own them yourself.

Read the generated admin password / API key:

kubectl get secret messaging-centrifugo -o jsonpath='{.data.admin-password}' | base64 -d; echo
kubectl get secret messaging-centrifugo -o jsonpath='{.data.http-api-key}'   | base64 -d; echo

Call the HTTP API:

curl -H "X-API-Key: $API_KEY" -X POST http://127.0.0.1:8000/api/info

Configuration

Everything is driven by CENTRIFUGO_* environment variables (see centrifugo defaultenv for the full list). extraEnvVars is the seam for any setting not surfaced as a value (TLS, proxies, channel namespaces, Redis tuning).

ValueDefaultNotes
image.repositoryghcr.io/quenchworks/images/centrifugo
image.digest(CI-maintained)signed multi-arch index
replicaCount1stateless Deployment (memory engine)
engine.typememorymemory (single node) or redis (scale-out)
admin.enabledtrueadmin web UI at /
secrets.tokenHmacSecretKey""generated if empty; CENTRIFUGO_CLIENT_TOKEN_HMAC_SECRET_KEY
secrets.apiKey""generated if empty; CENTRIFUGO_HTTP_API_KEY
secrets.adminPassword""generated if empty; CENTRIFUGO_ADMIN_PASSWORD
secrets.adminSecret""generated if empty; CENTRIFUGO_ADMIN_SECRET
secrets.existingSecret""bring your own Secret (keys via secrets.keys.*)
allowedOrigins[]CENTRIFUGO_CLIENT_ALLOWED_ORIGINS (space-joined)
service.typeClusterIP
service.port8000client endpoints, admin UI, API, /health
ingress.enabledfalseCreate an Ingress for this chart. HTTP only.
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}].
tls.enabledfalseThe HTTP server (API, websocket, health) serves https on the same port (cert 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.

Deploy centrifugo with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has centrifugo 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 chartcentrifugo 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