Upgrade, update the model and renew the licence (on-premise)

Move your on-premise ZeusLock to a new version, update the AI model set, roll back and renew the licence, while your organisation, users and incidents are kept.

For the IT person who runs ZeusLock on your own server. ZeusLock tells you when a new version is out; you move to it on your own schedule. Your organisation, users, policies, incidents, login and licence all survive an upgrade: it only swaps the software.

Everything ships together under one version number, X.Y.Z: your install is a Helm chart version, and upgrading means installing a newer chart version. The AI model set has its own number (0.4, 0.5, …), and each chart version pins one model set. Version 0.2.0 (19 Nov 2026) pins model set 0.4. Version 0.2.1 (25 Nov 2026) pins model set 0.5 and adds ZeusLock On-Device: upgrading 0.2.0 to 0.2.1 is the normal way to get set 0.5.

Before a major upgrade

Snapshot the Postgres volume (PVC), or take a pg_dump. A rollback does not reverse a database migration. For the nightly backup, see step 10 of Install ZeusLock on your own server.

Step 1 — Upgrade to the new version

Replace X.Y.Z with the version ZeusLock announced, then run on your server:

export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
# Log in to the registry if the session expired:
helm registry login harbor.zeuslock.ai -u 'robot$customer-<you>' -p '<your-robot-secret>'

helm upgrade zeuslock oci://harbor.zeuslock.ai/zeuslock-releases/zeuslock \
  --version X.Y.Z \
  -n zeuslock --reset-then-reuse-values \
  --wait --timeout 30m
  • Always upgrade to an explicit --version. Never rely on "latest".
  • --reset-then-reuse-values keeps your existing settings and licence and takes the new chart's defaults for settings that did not exist before. Never use plain --reuse-values: it drops the new defaults, and the new chart then fails on a missing setting. It needs Helm 3.14 or newer (helm version).

What happens, in order:

  1. The new images (:X.Y.Z) are pulled from the ZeusLock registry, only the layers that changed.
  2. The db-migrate job updates the database schema (forward only, your data is kept).
  3. The pods restart one at a time (--wait waits until they are healthy).
  4. Login, dashboard, API keys and the licence carry over.
  5. If the new chart pins a new model set, the llm pod downloads it (digest and signature checked) and warms it up before it is Ready.

Expected result: STATUS: deployed.

Step 2 — Check the new version

kubectl -n zeuslock get pods                 # all Running, new image tags
kubectl -n zeuslock get deploy zeuslock-zeuslock-api \
  -o jsonpath='{.spec.template.spec.containers[0].image}{"\n"}'   # → …/api:X.Y.Z
helm test zeuslock -n zeuslock --logs               # 3 × PASS, prints model=<core|caty>-<set>

Expected result: all pods Running with the new image tags, the api image ends in /api:X.Y.Z, and helm test prints three PASS lines with the model that answers.

If you overrode image tags

If your values.yaml sets api.image.tag (for example to a sha-* for a hotfix), clear it so the chart's version drives the tag again: add --set api.image.tag="" --set worker.image.tag="" (worker = the api image) to the upgrade command.

Roll back

Helm keeps every release revision. To go back:

helm history zeuslock -n zeuslock              # list revisions
helm rollback zeuslock <previous-revision> -n zeuslock --wait

The previous version's images are still in the ZeusLock registry, so they roll back cleanly. A rollback does not reverse a database migration: if the newer version ran a destructive schema change, restore the database from backup instead (migrations are written to be additive, so this is rare).

Update the AI model

Each chart version pins one model set. A platform upgrade that brings a new set downloads it on the llm pod's next start (digest and signature verified, refused otherwise). The model files are kept on a volume, so a restart without a new set downloads nothing.

A model update without a platform upgrade

This works only for a set the installed chart pins in detection.sets: set detection.version: "<set>" in values.yaml and run the upgrade command. The chart refuses a set it does not know ("use a version this chart pins, or add its digests").

Model set 0.5 on version 0.2.0

Chart 0.2.0 pins only set 0.4, so --set detection.version=0.5 alone fails on it. The simplest way to get set 0.5 is to upgrade to version 0.2.1. To stay on 0.2.0, ZeusLock copies set 0.5 into your registry project and sends you a file set05.yaml. Put it next to values.yaml and run:

helm upgrade zeuslock oci://harbor.zeuslock.ai/zeuslock-releases/zeuslock \
  --version 0.2.0 -n zeuslock --reset-then-reuse-values \
  -f set05.yaml --set detection.version=0.5 --wait

Expected result: helm test zeuslock -n zeuslock --logs prints three PASS lines with model=caty-0.5. Going back to set 0.4 (helm rollback) took 35 s in our test.

Pause during a model update

  • ZeusLock Core on a GPU with 16 GB or more and detection.gpu.timeSlicing: true (gpu-stack.sh --time-slicing): none, the new copy loads beside the old one.
  • ZeusLock Core on smaller GPUs: about 1–2 minutes, during which checks use the pattern rules (detection.failMode decides allow or block).
  • ZeusLock Caty with 2 replicas: none; with 1: about a minute.

Roll back the model

Run helm rollback, or put the previous detection.version back and run the upgrade command.

Renew the licence

ZeusLock sends you a new license.jwt. Your licence is stored in the Helm release values, so --reset-then-reuse-values re-applies the old one on every upgrade until you pass the new file. Pass it with the version you already run (helm list -n zeuslock shows it), then restart the api:

helm upgrade zeuslock oci://harbor.zeuslock.ai/zeuslock-releases/zeuslock \
  --version <installed version> -n zeuslock --reset-then-reuse-values \
  --set-file license.token=license.jwt --wait
kubectl -n zeuslock rollout restart deploy/zeuslock-zeuslock-api
kubectl -n zeuslock rollout status deploy/zeuslock-zeuslock-api

Expected result: successfully rolled out and the api pod Running. The api reads the licence only when it starts, and it does not restart by itself when the licence changes, so the restart is needed.

  • A bad file still gives STATUS: deployed; it fails (CrashLoopBackOff) only when the api restarts, while the old pod keeps serving. Run the commands again with a good file.
  • Do not edit the licence Secret (zeuslock-zeuslock-license) by hand: the next upgrade undoes it.
  • An expired licence gives 14 days of read-only dashboard (detection keeps working); after that the api does not start.

Quick reference

TaskCommand
Upgradehelm upgrade zeuslock oci://…/zeuslock --version X.Y.Z -n zeuslock --reset-then-reuse-values --wait
Check running versionkubectl -n zeuslock get deploy zeuslock-zeuslock-api -o jsonpath='{…image}'
Rollbackhelm rollback zeuslock <rev> -n zeuslock --wait
Model-only updatehelm upgrade … --reset-then-reuse-values --set detection.version=<set> --wait (only a set the installed chart pins)
Licence renewalhelm upgrade … --version <installed> --reset-then-reuse-values --set-file license.token=license.jwt --wait, then kubectl -n zeuslock rollout restart deploy/zeuslock-zeuslock-api
Which model answershelm test zeuslock -n zeuslock --logs (prints model=…), or dashboard Settings → Protection → AI detection model
Revision historyhelm history zeuslock -n zeuslock

Known limits

  • A rollback does not reverse a database migration: keep a snapshot or a backup before a major upgrade.
  • Model set 0.5 on version 0.2.0 has been tested with ZeusLock Caty, not yet with ZeusLock Core.

If something fails

ProblemFix
The new chart fails on a missing settingThe upgrade used plain --reuse-values. Run it again with --reset-then-reuse-values (Helm 3.14 or newer).
Helm cannot pull the chartThe registry session expired. Run the helm registry login line from step 1 again.
"use a version this chart pins, or add its digests"The installed chart does not pin that model set (chart 0.2.0 pins only 0.4). Ask ZeusLock for set05.yaml and use the command in "Model set 0.5 on version 0.2.0".
llm pod Init:Error, log says cannot resolve …/model:…The model set is not in your registry project yet. Contact ZeusLock support; the pod retries by itself once it is fixed.
api pod CrashLoopBackOff after a licence renewalThe new licence file is bad. Run the two renewal commands again with a good license.jwt.