Kubernetes Deployment with Helm
RMS ships a Helm chart under
helm/ that deploys the API
server and, optionally, in-cluster PostgreSQL. The API server applies its embedded
sqlx migrations automatically on startup. Make sure the
deployment prerequisites - persistence, certificates, and
secrets - are in place first.
Chart components
All RMS runtime configuration is delivered through a TOML file that the chart
renders from apiServer.* values into the rms-api-config ConfigMap, mounted
read-only at /etc/rms/config.toml. See
Configuration via Helm
for the value → config.toml key mapping. The default posture is mTLS on
(apiServer.tls.enabled: true, apiServer.allowInsecure: false), so a bare
install needs TLS material.
Versioning
The chart uses two independent version axes:
Set global.image.tag (or per-component apiServer.image.tag) at
install/upgrade to pick the application build. See
helm/README.md for
the full chart-version policy and automation.
Install from NGC
Replace <NGC_TOKEN> with your NGC API key,
<CHART_VERSION> with the chart semver (e.g. 1.0.0), and <APP_TAG> with
the RMS image tag (e.g. v0.8.0-rc4):
Verify:
Install from a local checkout
You can also install directly from the repo’s helm/ directory, layering site
overrides with -f (later files win):
Site values example
Keep helm/values.yaml as the base and layer a site file. This external-DB,
mTLS-on example references certs and secrets created in the
prerequisites:
Insecure and in-memory modes (dev/test only)
For local development on a laptop or k3s cluster, you can opt out of mTLS and/or the database. Not appropriate for shared, staging, or production clusters - any client that can reach port 8801 can invoke every RPC (firmware flash, power control, switch password rotation) with no authentication.
When allowInsecure: true, the chart renders [tls] insecure = true and
injects the RMS_ALLOW_INSECURE=1 env gate together (defense in depth). Set
databaseMode: memory to skip all database wiring:
The repo ships override examples under helm/examples/overrides/
(local-dev-values.yaml, switch-insecure-values.yaml,
firmware-pvc-values.yaml) and documents insecureSwitch test cases in
helm/INSECURE_SWITCH_TESTING.md.
Upgrade
To roll the application image only (same chart):
If you install with a values file, pass it first so other settings are preserved
(-f my-values.yaml -f upgrade-values.yaml). After upgrade, the API server rolls
to the new image and applies any pending sqlx migrations on startup. If pods don’t
roll automatically:
Access the API in-cluster
Then connect to localhost:8801 (or the port set in apiServer.port).
Uninstall
If dropDatabaseOnUninstall: true, a pre-delete hook runs a job to drop the
release database. Set it to false to keep the database.
Standalone Postgres reinstall caveat. In
databaseMode: standalone, the Postgres PVC survives uninstall even whendropDatabaseOnUninstall: truedrops the release database from the live pod. On reinstall the container finds the existing data directory and skips first-run init, soPOSTGRES_DBis never consulted. The chart’swait-for-dbinit container handles this by idempotently runningCREATE DATABASEbefore the API server starts. On older charts, create it manually:
Package the chart
To port the chart elsewhere without the source repo:
Resulting Kubernetes components
A standalone-Postgres install produces roughly:
An external-DB install omits the postgres StatefulSet/Service and instead relies
on the external cluster plus the synced credentials Secret.