Skip to content

Deploying with Helm

Built

The chart at deploy/chart/ is the deploy primitive: one chart serves both disposable per-PR previews and production. It runs the container image; the live per-PR preview environments are its first consumer, and production reuses it unchanged by setting three values, covered in running in production.

Modepostgres.enabledbootstrap.enabledDatabase
Preview (default)truetruebundled, ephemeral (emptyDir)
Productionfalsefalseexternal, via externalDsn

The bundled Postgres is deliberately ephemeral: its data is an emptyDir and does not survive a pod restart, which is what you want for a throwaway preview. Production points at a real, managed Postgres.

Preview (bundled Postgres, an auto-created owner):

Terminal window
helm install og-pr-42 deploy/chart -n og-pr-42 --create-namespace \
--set image.tag=sha-<full-sha>

Production (BYO Postgres, no auto-owner):

Terminal window
helm install omniglass deploy/chart -n omniglass --create-namespace \
--set postgres.enabled=false \
--set externalDsn='postgres://user:pass@db:5432/omniglass?sslmode=require' \
--set bootstrap.enabled=false \
--set image.tag=<release>

The server Deployment gates startup with init containers rather than Helm pre-install hooks, because a bundled Postgres in the same release is not up during the pre-install phase:

  1. wait-for-db (only when postgres.enabled) blocks until Postgres answers.
  2. migrate applies the schema (idempotent: dbmate runs each migration once). It refuses a database a newer release migrated, naming the database’s newest migration and the newest the image knows, so the pod fails here rather than serving on a schema it does not know.
  3. bootstrap (only when bootstrap.enabled) creates the first owner and mints its bearer token, printed once to this container’s logs. Idempotent: a restart mints no second token.

Migrations only move forward: a helm rollback to an image older than the newest migration the schema carries stops at migrate. Roll back the image only together with the database backup taken before the upgrade, or roll forward.

Both migrate and bootstrap are safe to re-run on every rollout. At server.replicas > 1 each replica’s migrate runs, but they take turns on a Postgres advisory lock: the first applies the pending migrations and the others wait for it, then find nothing left to do.

A chart deployment keeps two things across a pod restart, a helm upgrade and a helm uninstall followed by a helm install of the same release into the same namespace: its encryption key and its data volume. Nothing a user can observe changes across any of them.

Every secret Omniglass stores in Postgres is sealed under one encryption key. The server reads it from OMNIGLASS_ENCRYPTION_KEY, which the chart fills from a Kubernetes Secret (key encryption-key), so the key never lives in the pod:

  • Supplied. Set encryptionKey.existingSecret to the name of a Secret you manage that holds encryption-key (base64 of 32 random bytes, e.g. head -c 32 /dev/urandom | base64). A supplied Secret always wins; the chart generates nothing.
  • Generated (the default, encryptionKey.generate=true). The chart creates <release>-encryption-key on the first install and reads its live value back on every upgrade, so the key never changes. The Secret carries helm.sh/resource-policy: keep, so helm uninstall leaves it behind and a reinstall of the same release adopts it.

With no existingSecret and generate=false the chart refuses to render, rather than boot a server with no key.

The generated key relies on Helm reading the live Secret at render time (lookup). A renderer that runs helm template without a cluster, as a GitOps controller such as Argo CD does, cannot, and renders a fresh key each time; there, supply the key with encryptionKey.existingSecret.

The server’s data directory is /var/lib/omniglass (OMNIGLASS_DATA_DIR), and the embedded JetStream store sits under it at /var/lib/omniglass/nats (OMNIGLASS_NATS_STORE_DIR), the same layout as the lab. With persistence.enabled (the default) the chart mounts a ReadWriteOnce PersistentVolumeClaim there, <release>-data, also marked helm.sh/resource-policy: keep. The Deployment uses the Recreate strategy: one server owns one bus and one volume, so the old pod stops before the new one starts.

The guarantee this buys: a batch the stream acknowledged before a restart lands after it. An outpost drops a batch from its spool once the OG_TELEMETRY stream acknowledges it (messaging); the stream’s store is on the volume, so a batch acknowledged and not yet written to Postgres by og-telemetry-worker is still there when the server comes back, and lands then.

persistence.enabled=false swaps the claim for an emptyDir, which a pod restart loses, along with any telemetry the bus held. That suits a disposable preview and nothing else.

helm uninstall removes the release and keeps exactly two resources, which it names in its output: the generated key Secret and the data claim. Reinstalling the same release name into the same namespace adopts both. To remove an instance for good, delete them by hand, after backing up the key if the database is staying:

Terminal window
kubectl -n omniglass delete secret omniglass-encryption-key
kubectl -n omniglass delete pvc omniglass-data

The database is separate: with postgres.enabled=false it is yours and the chart never touches it; the bundled preview Postgres is an emptyDir and goes with the release.

KeyDefaultPurpose
image.repositoryghcr.io/hyperscaleav/omniglassimage to run
image.taglatestpin to sha-<full-sha> for an exact, immutable build
image.pullPolicyIfNotPresent
server.replicas1server pod count
server.resourcessmall requests/limits
server.extraEnv[]additional environment variables as EnvVar entries
server.envFrom[]additional environment sources (ConfigMap or Secret refs) as EnvFromSource entries
service.port8080ClusterIP service port
ingress.enabledfalsecreate an Ingress (on for per-PR previews)
ingress.classNametraefikingress controller class
ingress.hostemptyrequired when ingress.enabled; the public host
bootstrap.enabledtrueauto-create an owner (previews)
bootstrap.usernamepreviewowner username
bootstrap.email / bootstrap.labelempty / Preview Owneroptional owner fields
postgres.enabledtruebundle an ephemeral Postgres
postgres.image / user / password / databasepostgres:18 / omniglass x3bundled Postgres settings
postgres.resourcessmall requests/limitsbound the throwaway DB
externalDsnemptyrequired when postgres.enabled is false
encryptionKey.existingSecretemptyname of a Secret holding the key under encryption-key; always wins
encryptionKey.generatetruegenerate and keep <release>-encryption-key when no existingSecret is set
persistence.enabledtrueput the data directory on a kept PersistentVolumeClaim; false uses an emptyDir
persistence.size1Githe claim’s requested size
persistence.storageClassemptythe claim’s storage class; empty uses the cluster default
server.secureCookiestruemarks session cookies Secure (https-only); set false only for a plaintext-http deployment
nameOverrideemptyoverride the chart name in resource names
fullnameOverrideemptyoverride resource names outright; default release-named resources keep preview service DNS predictable (e.g. og-pr-42)

Anything the chart’s values do not cover reaches the server as plain environment via server.extraEnv and server.envFrom. The full server surface renders from the declared environment registry (make gen). The chart already sets OMNIGLASS_SECURE_COOKIES from server.secureCookies, OMNIGLASS_ENCRYPTION_KEY from the key Secret, and OMNIGLASS_DATA_DIR and OMNIGLASS_NATS_STORE_DIR into the data volume (durable state).

Both values are passed to the server container, the migrate init container, and the bootstrap init container when bootstrap.enabled is true, so the Omniglass containers share one configuration.

Set a plain variable with extraEnv, or pull all keys from a Secret or ConfigMap with envFrom:

server:
extraEnv:
- name: "OMNIGLASS_TRUSTED_PROXIES"
value: "10.0.0.0/8"
envFrom:
- secretRef:
name: omniglass-extra-env
- configMapRef:
name: omniglass-config

To supply a custom encryption key, use encryptionKey.existingSecret rather than server.extraEnv. The chart sets OMNIGLASS_ENCRYPTION_KEY from its own Secret; placing it in server.extraEnv creates a duplicate entry that may cause decryption failures if the duplicate is later removed (see The encryption key).

Upgrading a deployment that sets the old names (OMNIGLASS_SECRET_KEY or OMNIGLASS_SECRET_KEY_FILE): it keeps working, because the server still reads them while neither new name is set, and it logs a deprecation warning naming the replacement on every boot. Rename the variable in your values or Secret (the value is unchanged) before the release that stops reading it; once a new name is set the old one is ignored, and a leftover is called out in the log.

VariableDefaultPurpose
OMNIGLASS_DSN local dev DSN Postgres connection string the Storage Gateway dials; wins over DATABASE_URL when both are set
DATABASE_URL (none) conventional DSN fallback, used when OMNIGLASS_DSN is unset
OMNIGLASS_ADDR :8080 HTTP listen address; port 0 binds a free port, reported in the ready file
OMNIGLASS_SECURE_COOKIES off set true behind TLS to mark the session cookie Secure (https only)
OMNIGLASS_TRUSTED_PROXIES loopback and private ranges comma-separated CIDRs or addresses of the proxies whose X-Forwarded-For is believed, for the client address sessions, tokens and webhook limits record; a list replaces the default whole, none believes no proxy, and a bad entry fails the boot
OMNIGLASS_NATS_ADDR 127.0.0.1:4222 listen address (host:port) of the embedded NATS server; port 0 binds a free port, reported in the ready file
OMNIGLASS_NATS_STORE_DIR temp dir JetStream store directory
OMNIGLASS_NATS_URL the bus's bound address bus URL the outpost-claim exchange advertises to outposts; unset, the URL of the address the bus bound (loopback for a wildcard host such as 0.0.0.0)
OMNIGLASS_DATA_DIR .omniglass local non-Postgres server state (notably the fallback encryption key)
OMNIGLASS_SETTINGS_FILE (none) optional operator settings file (JSON or YAML), the layer between code defaults and the DB override
OMNIGLASS_READY_FILE (none) path the server writes once it serves: a JSON object of the addresses it bound (addr, nats_addr) and the bus URL it advertises (nats_url), for a supervisor or test that asked for port 0; cleared at boot, removed at a graceful shutdown
OMNIGLASS_OMNIBOT_REPLAY (none) path to a recorded model the server's omnibot plays, turn by turn as each conversation stands, for a demo or a test; unset, the server has no model and a run is refused
OMNIGLASS_ENCRYPTION_KEY (none) base64 32-byte encryption key, the key-encryption key every secret is sealed under at rest; wins over the key file
OMNIGLASS_ENCRYPTION_KEY_FILE (none) path to a file holding the encryption key; the intended production source (the generated fallback under the data dir is convenience, not security)
OMNIGLASS_SECRET_KEY (none) Deprecated, renamed OMNIGLASS_ENCRYPTION_KEY: the encryption key's old name, read only when neither OMNIGLASS_ENCRYPTION_KEY nor OMNIGLASS_ENCRYPTION_KEY_FILE is set; warns on every boot, removed in a later release
OMNIGLASS_SECRET_KEY_FILE (none) Deprecated, renamed OMNIGLASS_ENCRYPTION_KEY_FILE: the encryption key file's old name, read only when neither OMNIGLASS_ENCRYPTION_KEY nor OMNIGLASS_ENCRYPTION_KEY_FILE is set; warns on every boot, removed in a later release
OMNIGLASS_SERVER_NAME the hostname the server's identity: the name its own platform component, which carries its request and query timing, is ensured under at boot; set it when servers share a hostname or a server moves hosts
OMNIGLASS_CLOSED_LOOP_BRACKET 1m how often the server brackets each outpost with a connected simulator for Platform health's sliding window, ten brackets long; 1s to 1m, and a value outside that fails the boot
OMNIGLASS_CLOSED_LOOP_HEARTBEAT 30s the check-in interval the closed loop assumes for each outpost with a simulator, to count which poll targets were due over its window; set it to the outposts' --heartbeat
OMNIGLASS_CLOSED_LOOP_PROBE_EVERY every check-in the reachability-probe interval the closed loop assumes for each outpost with a simulator; set it to the outposts' --probe-every
OMNIGLASS_INGEST_PARTITIONS 4 how many ingest lanes land outpost telemetry side by side, each outpost's batches always on one lane and in the order it sent them; 1 to 64, held under the database pool less one, and a value outside that range fails the boot; change it with the telemetry backlog drained, or an outpost's batches held across the change may land out of order
OMNIGLASS_SETTING__LABEL__ACRONYMS AV,BYOD,DSP,EDID,HDBaseT,HDCP,HDMI,IP,IR,KVM,LAN,LCD,LED,MTR,NDI,NVR,OLED,PC,PoE,PTZ,RF,SDI,SIP,TV,UC,USB,VC,VLAN,4K,8K Words a generated label title-cases to a fixed form, whole-word and case-insensitive
OMNIGLASS_SETTING__RETENTION__METRIC_DAYS 14 Days a metric sample is kept, unless its type keeps its own (a metric type's retention_days); a sample on the lane's window leaves with its UTC day, up to a day later; at least 3, the shortest window that folds into blocks
OMNIGLASS_SETTING__RETENTION__PROPERTY_DAYS 90 Days a property transition is kept, unless its type keeps its own (a property type's retention_days)
OMNIGLASS_SETTING__RETENTION__TREND_DAYS 730 Days an hourly metric trend is kept (#1276)
OMNIGLASS_SETTING__RETENTION__LOG_DEBUG_DAYS 3 Days a debug log line is kept
OMNIGLASS_SETTING__RETENTION__LOG_INFO_DAYS 14 Days an info or notice log line, or one with no severity, is kept
OMNIGLASS_SETTING__RETENTION__LOG_WARNING_DAYS 30 Days a warning log line is kept
OMNIGLASS_SETTING__RETENTION__LOG_ERROR_DAYS 90 Days an error, critical, alert or emergency log line is kept
OMNIGLASS_SETTING__RETENTION__OUTPOST_LOG_DEBUG_DAYS (none) Days an outpost's own debug log line is kept; unset follows log_debug_days
OMNIGLASS_SETTING__RETENTION__OUTPOST_LOG_INFO_DAYS (none) Days an outpost's own info or notice log line, or one with no severity, is kept; unset follows log_info_days
OMNIGLASS_SETTING__RETENTION__OUTPOST_LOG_WARNING_DAYS (none) Days an outpost's own warning log line is kept; unset follows log_warning_days
OMNIGLASS_SETTING__RETENTION__OUTPOST_LOG_ERROR_DAYS (none) Days an outpost's own error, critical, alert or emergency log line is kept; unset follows log_error_days
OMNIGLASS_SETTING__COLLECTION__REPORT_SECONDS 60 Seconds each endpoint's collection telemetry covers: its polls' mean duration and failures, and the pushes its listeners claimed or did not, reported once a window
OMNIGLASS_SETTING__NOTIFICATION__CONSOLE_URL (none) The console's base URL as a receiver of a notification reaches it (https://omniglass.example.com); the prefix of the Link a notification's subject and text read. Empty leaves Link empty
OMNIGLASS_SETTING__NOTIFICATION__EGRESS_ALLOW (none) The internal destinations a notification may reach, each a CIDR (10.20.0.0/16), an address, or a host name (chat.corp.example). Everything private, loopback or link-local is refused unless named here; a cloud metadata address is refused even when it is; plain http is admitted only to a destination named here
OMNIGLASS_SETTING__NOTIFICATION__MAIL_RELAY (none) The SMTP relay email notifications go through, host:port (smtp.example.com:587). Empty turns email off. An internal relay is reached only when egress_allow names it
OMNIGLASS_SETTING__NOTIFICATION__MAIL_SECURITY starttls How the session to the relay is protected: starttls (the relay must offer it), tls (implicit TLS, port 465), or none, admitted only for a relay egress_allow names (a lab's mail sim)
OMNIGLASS_SETTING__NOTIFICATION__MAIL_FROM (none) The From address of an email notification (Omniglass <alerts@example.com>)
OMNIGLASS_SETTING__NOTIFICATION__MAIL_SECRET (none) A platform basic-auth secret, by name, the relay session authenticates with; empty sends without authenticating. Setting it from the console or API, or moving mail_relay there while one is set, takes secret:bind on that secret; the settings file and environment are trusted as deployment config
OMNIGLASS_SETTING__DATABASE__SLOW_QUERY_MS 500 Milliseconds a query may run before the server logs it as slow (its statement's shape and duration, never its values) and counts it; 0 turns the log off
OMNIGLASS_SETTING__AGENT__READ always Policy for an agent's reads (a GET, or a POST gated on a read permission)
OMNIGLASS_SETTING__AGENT__WRITE ask Policy for an agent's writes that create or act (a POST that is not a read)
OMNIGLASS_SETTING__AGENT__DESTRUCTIVE ask Policy for an agent's writes that overwrite or delete (a PATCH, PUT or DELETE)
OMNIGLASS_SETTING__AGENT__CREDENTIAL_DESTINATION ask Policy for an agent's calls that may point a stored credential somewhere (any operation gated on secret:bind)
OMNIGLASS_SETTING__ASSISTANT__CONVERSATION_DAYS 30 Days a stored omnibot conversation is kept after it last changed
OMNIGLASS_SETTING__ASSISTANT__PROVIDER none The model omnibot runs on: openai (any OpenAI-compatible chat completions server, OpenRouter by default) or none, which leaves the server's recording, if any
OMNIGLASS_SETTING__ASSISTANT__MODEL openai/gpt-4.1-mini The model's name on that server (openai/gpt-4.1-mini on OpenRouter, llama3.1 on Ollama)
OMNIGLASS_SETTING__ASSISTANT__BASE_URL https://openrouter.ai/api/v1 The server's base URL, /chat/completions appended. An internal server is reached only when the notification settings' egress_allow names it. Moving it from the console or API while a key_secret is bound takes secret:bind on that secret; the settings file and environment are trusted as deployment config
OMNIGLASS_SETTING__ASSISTANT__KEY_SECRET (none) A platform api-key secret, by name, sent as the bearer on every model call; empty calls without a key (a local server). Setting it from the console or API takes secret:bind on it; the settings file and environment are trusted as deployment config. The key never leaves the server
OMNIGLASS_SETTING__HEARTBEAT__TARGET (none) The webhook notification target the server sends its heartbeat to, by name; empty turns the heartbeat off. The request is signed by the target's bound hmac-key secret and subject to the egress allow list
OMNIGLASS_SETTING__HEARTBEAT__INTERVAL_SECONDS 60 Seconds between heartbeats
OMNIGLASS_SETTING__SSO__ISSUER (none) The identity provider's issuer URL exactly as its id_tokens carry it (https://login.example.com/realms/corp). Empty turns single sign-on off. An on-premises provider is reached only when the notification settings' egress_allow names it. Moving it from the console or API while client_secret is bound takes secret:bind on that secret; the settings file and environment are trusted as deployment config
OMNIGLASS_SETTING__SSO__CLIENT_SECRET (none) A platform oauth2-client secret, by name: its client_id field is the client id Omniglass is registered as, its client_secret field authenticates the token exchange. Setting it from the console or API takes secret:bind on it; the settings file and environment are trusted as deployment config
OMNIGLASS_SETTING__SSO__SCOPES openid email profile offline_access The scopes a sign-in asks for, space-separated. offline_access asks for the refresh token the re-check redeems; a provider that issues none gives sessions of recheck_grace_minutes and no API tokens
OMNIGLASS_SETTING__SSO__GROUPS_CLAIM groups The id_token claim carrying the person's groups at the provider (read by group mapping, #2363)
OMNIGLASS_SETTING__SSO__RECHECK_MINUTES 15 Minutes between re-checks: each link with a live session or token through it redeems its refresh token at the provider, and a refusal revokes them
OMNIGLASS_SETTING__SSO__RECHECK_GRACE_MINUTES 60 Minutes a link may go without a refresh the provider accepted (an outage) before its sessions and tokens are refused until one is; also the length of a session through a provider that issues no refresh token
OMNIGLASS_SECRET__<NAME> (none) declares a platform secret from the environment, named <NAME> lowercased with each underscore a hyphen (OMNIGLASS_SECRET__BEDROCK_KEY is bedrock-key); the value is a JSON object {"type": "<secret type>", "fields": {...}} checked against the type at boot. Held in memory, never sealed or written; listed with source env and changed only by its variable and a restart, and a stored platform secret of the same name fails the boot

By default the chart creates no Ingress: the standing deploy is reached by port-forward (or a cloudflared route dialing the ClusterIP Service directly).

8080/web
kubectl -n omniglass port-forward svc/omniglass 8080:8080
kubectl -n omniglass logs deploy/omniglass -c bootstrap # the one-time token

For per-PR previews, set ingress.enabled=true and an ingress.host. The chart then emits a plain-HTTP Ingress (class traefik) that the in-cluster controller Host-routes; the shared cloudflared tunnel fronts it with one wildcard route and terminates TLS at the edge, so the Ingress carries no tls block.

Terminal window
helm install og-pr-42 deploy/chart -n og-pr-42 --create-namespace \
--set image.tag=sha-<full-sha> \
--set ingress.enabled=true \
--set ingress.host=og-pr-42.preview.hyperscaleav.com \
--set fullnameOverride=omniglass

Qualified names through Traefik: an endpoint, secret or variable can be addressed by a qualified name whose slash (and $) is percent-encoded in the path, for example /api/v1/endpoints/<addr>%2Fhttps or /api/v1/secrets/%24platform%2Fdemo-panel-login. The chart’s default Ingress needs no extra setting for this: a pinned Traefik container in front of a backend that echoes the raw request path returned the same status as direct access, with the path intact, on Traefik 3.0.4, 3.6.25 and 3.7.19 (no entry point options set). Reproduce it with scripts/test-traefik-encoded-slashes.sh (needs Docker; override the versions with TRAEFIK_VERSIONS). If you tighten the entry point’s http.encodedCharacters options (for example allowEncodedSlash: false), Traefik answers 400 at the edge for these requests while direct access still works; the uuid form is unaffected.