Skip to content

Upgrading Faber (Zero-Downtime Two-Step Guide)

Faber uses additive CRD schema evolution and idempotent SQLite/PostgreSQL schema migrations so upgrades stay safe and reversible. Always split upgrades into two ordered steps: apply CRDs and the Helm chart first, then roll out pinned image digests second.

  1. Helm does not upgrade CRDs automatically: helm upgrade skips manifests under crds/. Applying updated faberops.dev/v1alpha1 CRDs before starting a newer controller guarantees new fields and CEL validation rules exist in kube-apiserver before the controller reads or writes them.
  2. Digest rollout separation: Updating RBAC, chart templates, and CRDs independently from container image digests makes it straightforward to verify manifest diffs and roll back an image digest without reverting schema updates.

Step 1: Apply CRDs and Upgrade the Helm Chart

Section titled “Step 1: Apply CRDs and Upgrade the Helm Chart”

Verify the Cosign signature on the OCI Helm chart before extracting CRDs (see SECURITY.md for full Cosign verification flags):

Terminal window
helm pull oci://ghcr.io/faberops/charts/faber --version 2.0.0 --untar --untardir /tmp/faber-chart

Apply all 9 faberops.dev/v1alpha1 CRDs using server-side apply:

Terminal window
kubectl apply --server-side -f /tmp/faber-chart/faber/crds/

If you use the bundled agentSandbox subchart (agentSandbox.enabled=true), also apply the vendored agent-sandbox CRDs:

Terminal window
kubectl apply --server-side -f /tmp/faber-chart/faber/charts/agent-sandbox/crds/

Confirm all CRDs are established:

Terminal window
kubectl get crds | grep faberops.dev

Run helm upgrade while keeping your existing pinned image digests (or letting the chart target the release tag if you do not pin digests separately):

Terminal window
helm upgrade faber oci://ghcr.io/faberops/charts/faber \
--version 2.0.0 \
--namespace faber \
-f values.yaml

For GitOps-managed clusters (Flux HelmRelease or Argo CD Application), commit the CRD manifests (or configure crds: CreateReplace in Flux HelmRelease.spec.upgrade) in a first PR or sync wave before bumping the chart version.

Once CRDs and RBAC changes are reconciled, update image.digest and (if Tier 1 sandboxes are enabled) sandbox.image.digest to the target immutable SHA-256 digests:

image:
repository: ghcr.io/faberops/faber-controller
tag: v2.0.0
digest: "sha256:REPLACE_WITH_CONTROLLER_DIGEST"
sandbox:
image:
repository: ghcr.io/faberops/faber-sandbox
tag: v2.0.0
digest: "sha256:REPLACE_WITH_SANDBOX_DIGEST"

Apply the digest update and verify the rollout:

Terminal window
helm upgrade faber oci://ghcr.io/faberops/charts/faber \
--version 2.0.0 \
--namespace faber \
-f values.yaml
kubectl -n faber rollout status deploy/faber

Upgrading from v1.6.0 to v1.7.0 requires no CRD schema changes or database migrations and preserves full chart-first upgrade compatibility:

  • Zero-network default: New catalog.* Helm values (catalog.sources, catalog.refreshInterval, catalog.registryAuthExistingSecret, catalog.registryAuthSecretKey) are omitted from the controller Deployment when unset, so existing v1.6.0 controller pods continue to start cleanly during Step 1 before you roll out v1.7.0 images in Step 2.
  • Embedded Core Catalog: After Step 2 rolls out v1.7.0, the Web GUI Catalog Browser (/catalog) and /api/v1/catalog API serve the embedded starter recipes, inputs, tools, and outputs automatically with zero outbound network calls.
  • Optional OCI catalogs: To browse external OCI registries such as oci://ghcr.io/faberops/catalog:v1 or a private corporate registry from the Web GUI, configure catalog.sources (and catalog.registryAuthExistingSecret for private registries) after Step 2 completes, and allow HTTPS egress to your registry host if networkPolicy.enabled=true.
  • New faberctl catalog CLI: Upgrade faberctl to v1.7.0 to use the 10 new faberctl catalog subcommands (search, inspect, install, diff, upgrade, init, validate, test, build, publish) and FABER_CATALOG_TOKEN. See FaberOps Catalogs.
  • PostgreSQL HA (store.driver=postgres, replicaCount >= 2): Uses strategy: RollingUpdate. Starting replicas acquire a PostgreSQL session advisory lock (pg_advisory_lock) to serialize idempotent schema migrations, establish LISTEN faber_run_events before reporting /readyz, and transfer reconciler leadership via Kubernetes Lease with zero HTTP/SSE downtime.
  • SQLite (store.driver=sqlite, replicaCount=1): Uses strategy: Recreate because the ReadWriteOnce PVC can attach to one pod at a time. Active WaitingApproval checkpoints persist safely across restarts in /data/faber.db.
  • In-flight Tier 1 sandboxes: Any interrupted sandbox claim is cleaned up automatically by OrphanRunSweeper (controller.orphanSweepInterval, default 5m).

Because CRD schema updates are additive, rolling back an image digest only requires reverting image.digest and sandbox.image.digest (or running helm rollback faber <revision> -n faber) without deleting CRDs or losing WaitingApproval checkpoints.

Terminal window
kubectl -n faber get deploy,pods
kubectl -n faber get maintenancepolicy,gitopsrepository,modelprofile
faberctl --server https://faber.example.com version