Docs Version v0.2
Docs menu

Running in production

Helm chart

Changed 7 min readv0.2

On this page

Deploys the Signari OIDC engine on Kubernetes: the engine Deployment, a pre-upgrade migration Job, a Service, and optional Ingress, HPA and PodDisruptionBudget.

What you must provide

You bring the PostgreSQL database; this chart deploys the engine, not the database (a production identity provider's database wants backup, HA and tuning decisions that belong to your data platform, not to an app chart).

Three things are required, and the chart refuses to render without any of them, since each would otherwise fail later and less clearly:

  • issuer: the public https URL clients reach the engine at. It is the iss claim in every token; changing it later breaks every relying party.
  • secret.dsn: the engine's PostgreSQL DSN, as signari_engine. The engine refuses to start as a superuser, a BYPASSRLS role or one that may SET ROLE to either, which would hand a compromised engine powers over the database server it never needs (SIGNARI_ALLOW_RLS_BYPASS=1 under extraEnv starts it anyway, with a warning).
  • secret.rootKey: 32 random bytes, base64 (head -c 32 /dev/urandom | base64). A generated-on-boot key would invalidate every stored signing key on restart, so it must be supplied and stable.

Install

signari_engine, the role the engine signs in as, has no password until you give it one: migration 0001 creates it without one, on purpose, and leaves one that is already there as it is. So first, as a superuser, create it with a password on the database the chart will use:

Shellpsql 'postgres://postgres@db:5432/signari' -c 'CREATE ROLE signari_engine LOGIN' -c '\password signari_engine'

\password asks twice and sends only the password's hash.

Next, migration 0001, which makes the schemas and the roles the others need, has to run once as a superuser. The chart's migration Job signs in with the DSN you give it, and the engine's DSN cannot apply 0001. So either run it yourself now, with the signari binary of the release you are installing:

ShellSIGNARI_DSN='postgres://postgres@db:5432/signari?sslmode=require' signari migrate bootstrap

or skip this and give the Job a superuser DSN in a Secret of your own, as in the production example below. Then install, with the password from the first step in the engine's DSN:

Shell( umask 077; head -c 32 /dev/urandom | base64 > root.key )helm install signari ./deploy/helm/signari \  --set issuer=https://auth.example.com \  --set secret.dsn='postgres://signari_engine:<that password>@db:5432/signari?sslmode=require' \  --set secret.rootKey="$(cat root.key)"

Copy root.key somewhere safe, off this machine. Every upgrade needs the same key, and without it the signing keys cannot be opened.

For production, manage the Secret yourself and reference it, so the root key and DSN never sit in a values file or Helm release history. Create signari_engine with its password first, as above, then:

Shellkubectl create secret generic signari-secrets \  --from-literal=SIGNARI_DSN=postgres://signari_engine:<that password>@db:5432/signari \  --from-literal=BOOTSTRAP_DSN=postgres://postgres:...@db:5432/signari \  --from-literal=SIGNARI_ROOT_KEY=... \  --from-literal=SIGNARI_ROOT_KEY_REF=k8shelm install signari ./deploy/helm/signari \  --set issuer=https://auth.example.com \  --set secret.existingSecret=signari-secrets \  --set migrations.superuserDsnSecretKey=BOOTSTRAP_DSN

The image

The chart deploys ghcr.io/binary-ly/signari at its appVersion, the image the release of that number publishes. That image is the release binary itself, the one signed beside the release, checked byte for byte before it is pushed, in a distroless image that runs as 65532:65532. It is signed by digest, with the binary's SBOM and its build provenance attested to the same digest. Check it before you deploy it:

Shellcosign verify ghcr.io/binary-ly/signari:0.2.1 \  --certificate-oidc-issuer https://token.actions.githubusercontent.com \  --certificate-identity-regexp '^https://github\.com/Binary-ly/signari/\.github/workflows/release\.yml@refs/(heads/main|tags/v[0-9.]+)$'gh attestation verify oci://ghcr.io/binary-ly/signari:0.2.1 -R Binary-ly/signari

A tag can be pointed at another image after you checked it, so in production deploy the digest that cosign verify printed: --set image.tag=0.2.1@sha256:<digest>. Releases before v0.2.0 published no image.

Migrations

Migrations run as a pre-install,pre-upgrade Helm hook Job (migrate all), never on engine boot. N replicas migrating on startup would race, and after a rollback it would be unclear which version the schema is at. The Job runs before the engine pods and is deleted before the next run. migrations.superuserDsnSecretKey names a Secret key holding the superuser DSN migration 0001 needs, since the engine's own signs in as signari_engine.

TLS

Two options. Terminate TLS at the ingress (the common case): set ingress.enabled and ingress.tls. The issuer is still https and __Host- cookies still work because the browser only sees the https ingress. Or have the engine serve HTTPS itself: set tls.certSecretName to a Secret with tls.crt and tls.key.

The admin API

Off by default. When adminApi.enabled, it listens on its own port and gets its own ClusterIP Service. It is never routed through the public ingress, because it is the write surface for the whole identity provider. It serves TLS from tls.certSecretName, and the chart refuses to render it without one unless adminApi.insecure=true asks for plaintext by name, as the engine does.

The console

Off by default. console.enabled adds the administration console beside the engine: one pod holding php-fpm and nginx, a ClusterIP Service on 8080, and a migration Job for its own tables that runs after the engine's. Its two images are built from admin/Dockerfile, the default target and --target web. No release publishes them yet, so build both, push them to a registry your cluster can pull from, and name it with console.image.repository and console.image.webRepository; the defaults name repositories that do not exist. It connects to the database as signari_admin and nothing wider, and writes through the Admin API, so it needs adminApi.enabled or console.adminUrl. Give it console.url, console.database.host, and console.secret.appKey and .dbPassword (or console.secret.existingSecret holding APP_KEY, DB_PASSWORD and SIGNARI_ADMIN_TOKEN); the chart refuses to render without them. The signari_admin role's password is yours to set on the database, as every role's is. Its pods carry their own name, so the engine's Service, budget and policy do not select them.

Metrics, network policy and scheduled commands

  • metrics.enabled serves Prometheus metrics on their own port and ClusterIP Service; metrics.serviceMonitor.enabled adds a prometheus-operator ServiceMonitor for it.
  • networkPolicy.enabled admits each port only from the peers you name: httpFrom (anyone when empty), metricsFrom and adminFrom (nobody when empty).
  • cronJobs runs engine commands on a schedule with the same Secret, for example signari audit verify every night.
  • backup.enabled dumps the database on backup.schedule and writes the root key beside each dump, keeping backup.retentionDays of both. It needs backup.dsnSecretKey, a superuser or BYPASSRLS DSN in the Secret, and backup.persistence.existingClaim, a PersistentVolumeClaim of yours. See the runbook, whose restore CI drills on kind.

How it installs

The migration Job runs migrate all against the image's /signari entrypoint. The chart's Secret is itself a hook, created before that Job, so helm uninstall leaves it behind: delete it by hand, or manage it yourself with secret.existingSecret. A second hook Job, after the migration, runs signari instance create -issuer <issuer>, since serve refuses to start until an instance names the issuer it serves. It is idempotent, so every upgrade runs it too. The image runs as 65532:65532, a number runAsNonRoot can check.

Readiness asks /readyz, which checks the database and the signing keys. Liveness waits five seconds a probe and six probes in a row: on Kubernetes' defaults, one second and three, a node short of CPU restarted every replica at once. The pod's terminationGracePeriodSeconds is derived from shutdown.drainSeconds and shutdown.timeoutSeconds, so the kubelet never kills a request the engine is still finishing, and the chart refuses those two settings in extraEnv, where the grace period could not follow them. helm test runs signari verify.

With networkPolicy.enabled, name the pods that may reach the metrics port in metricsFrom and those that may reach the Admin API in adminFrom. Left empty, each port is closed to everybody, Prometheus and the console included. A policy turned on does not cut connections already open, so a scraper with a keep-alive connection goes on reading until it reconnects.

How it is tested

CI installs the chart on kind whenever the chart or anything that goes into the image changes (.github/workflows/helm.yml), with PostgreSQL 17 beside it and the Secret made by hand, a superuser's DSN under its own key for the migration. It waits for two ready replicas, then checks that both hook Jobs ran, that helm test passed, and that /readyz, discovery naming the issuer, the key set and the signari_ metrics are served through their Services. It upgrades to three replicas and checks both hooks ran again. A client inside the cluster asks for discovery every 50 ms while one pod is deleted, and the job fails if any request does. A Prometheus run by the Prometheus operator must find every replica up through the chart's ServiceMonitor. Last, it drills a backup and restore. The render tests are TestTheHelmChartCanInstall and TestTheHelmChartRendersItsOptions.

The console is not in that job, because building its images would double the job's time. It was installed on kind by hand in November 2026: its pod came up 2/2, and signari:verify-boundary and signari:read-model-smoke passed inside it.

See docs/configuration.md for every environment variable; put optional ones (SMTP, SMS, GeoIP, audit streaming) under extraEnv.