Rolling Out an OpenBao Pod-Template Change¶
Kind: how-to
A change to OpenBao's pod template only takes effect when a person deletes openbao-0. Until then KubeStatefulSetUpdateNotRolledOut fires for openbao/openbao. The alert is expected. It clears once the restart window below has run. The restart takes down the platform's secrets store for about two minutes, so a pull request that changes the pod template comes with a person task for that window.
When this applies¶
The OpenBao chart (openbao 0.30.7) renders its StatefulSet with updateStrategy: OnDelete, the chart's default server.updateStrategyType. components/openbao/base/helmrelease.yaml does not override it. A change to the pod template creates a new revision of the StatefulSet. Kubernetes starts a pod on that revision only when the old pod is deleted.
These changes alter the pod template in components/openbao/base/helmrelease.yaml:
- the image, including a chart upgrade that changes it;
server.extraInitContainers(for exampleprepare-data);server.volumes,server.volumeMounts,server.resources,server.priorityClassName,server.postStartand the probes;server.standalone.config;- a chart upgrade whose StatefulSet pod template differs (
spec.template), for example a new image or a changed template.
A chart upgrade that leaves the pod template unchanged creates no revision and needs no restart window. The chart labels the pod template helm.sh/chart: openbao-<version>, so until #3377 every chart bump changed it. Chart 0.30.6 only fixed an ArtifactHub annotation, yet it created revision openbao-67c5d8ffcb, fired the alert and needed a restart (incident #3374). The HelmRelease now removes that label with a spec.postRenderers kustomize patch on the openbao StatefulSet. Nothing selects on the label: the StatefulSet's selector, the Services and the PDB use app.kubernetes.io/name, app.kubernetes.io/instance and component, and the chart's test pod does not use it. The other objects of the chart keep it. Removing it changed the pod template once more (revision openbao-777958fdb6, restart #3460); chart 0.30.7, the first bump after it, created no revision.
To tell whether a chart pull request changes the pod template, read the hetzner-mgmt diff in the manifest CI comment: a change under the openbao StatefulSet's spec.template needs the restart window, while changes to metadata.labels of other objects, or only to Chart.yaml, do not. With the post-renderer, charts 0.30.6 and 0.30.7 render the same pod template (helm template, and a server-side dry run of both StatefulSets on hetzner-mgmt, 2026-11-19).
The chart writes server.standalone.config into a ConfigMap. The HelmRelease sets server.configAnnotation: true (#1549), so the chart also puts the config's checksum on the pod as the annotation openbao.hashicorp.com/config-checksum (openbao.annotations in the chart's templates/_helpers.tpl). A config-only change therefore changes the pod template like the changes above. It needs the same restart window and person task. Without the annotation (the chart's default), such a change created no revision and fired no alert, and the running pod silently kept its old config.
The alert¶
KubeStatefulSetUpdateNotRolledOut comes from kube-prometheus-stack (chart 92.11.0, group kubernetesApps). It fires when, for 15 minutes, the StatefulSet's current revision differs from its update revision, kube_statefulset_replicas differs from kube_statefulset_status_replicas_updated, and the updated count has not changed for 5 minutes. With OnDelete all three stay true until openbao-0 is deleted. Its severity is warning. The kubernetesApps group has incident: "true" (components/prometheus-stack/helmrelease.yaml), so it also opens an incident task in Taskbase.
Do not silence it or work around it. It is the reminder that the restart window has not run.
Read-only checks¶
These checks show whether a change is waiting for the restart. Anyone with read access can run them.
kubectl --context admin@mgmt-cluster -n openbao get sts openbao -o jsonpath='{.status.currentRevision} {.status.updateRevision} {.status.updatedReplicas}/{.spec.replicas}{"\n"}'
kubectl --context admin@mgmt-cluster -n openbao get pod openbao-0 -L controller-revision-hash
flux --context admin@mgmt-cluster get helmreleases -n openbao # openbao Ready on the new revision
Waiting for the restart: the pod's controller-revision-hash differs from updateRevision, and updatedReplicas is 0/1.
Rolled out: the pod's controller-revision-hash equals updateRevision, and updatedReplicas is 1/1.
Do not expect currentRevision to equal updateRevision. With OnDelete, Kubernetes moves currentRevision only for RollingUpdate StatefulSets (completeRollingUpdate in pkg/controller/statefulset/stateful_set_utils.go, read 2026-10-24 on release-1.34). In incident #1542, currentRevision was openbao-548f7d779c while the pod ran openbao-58f87bb749 and the update revision was openbao-699c8c8c4. The alert clears through updatedReplicas, not through currentRevision.
Who runs the restart window¶
The owner, or a person with cluster access whom the owner chooses, runs it through the person task described below.
The operator agent does not run it on its own. Its rules of engagement allow a stateful step only after a fresh, restore-verified backup from the component's backup gate. OpenBao's gate (openbao-preupgrade, #1548) runs before a chart change is applied, not before a restart, so the restart window stays with a person. Its record, hetzner-mgmt/openbao/preupgrade/last-success.env, is the backup the person task cites (OpenBao backups). When the alert reaches the operator, it checks that the cause is a waiting pod-template change and hands the restart to the person task.
Every pod-template pull request comes with a person task¶
When a pull request changes the OpenBao pod template, its author creates a person task for the restart window in the same project before merging, and links it from the pull request. This also applies to an agent that handles a Renovate pull request for the OpenBao chart or image, when the rendered pod template changes (When this applies). A chart bump that leaves it unchanged needs no person task; the agent says so in the Upgrade evidence, citing the CI diff. The task:
- is assigned to the owner (
assignee_type1); depends_onthe pull request's task, so it shows once the change has merged;- names what the restart will do, in particular anything
prepare-datawill delete; - links this page.
OpenBao is the secrets store. During the restart, about two minutes, every ExternalSecret refresh and every OpenBao login fails. Without the task, nobody is asked to restart the pod. #1390 merged without one, and the alert then fired for three days (incident #1542).
Run the restart window¶
-
Check the backup. The nightly snapshot ran today:
kubectl --context admin@mgmt-cluster -n openbao get cronjob openbao-snapshot -o jsonpath='{.status.lastSuccessfulTime}{"\n"}'The snapshot is checked by hash, not by restore. The newest restore-verified copy is the last monthly drill:
kubectl --context admin@mgmt-cluster -n openbao-drill get cronjob openbao-restore-drill -o jsonpath='{.status.lastSuccessfulTime}{"\n"}'. Decide whether that is enough for this change. For a change that deletes data, it is the owner's decision. -
Check that the new revision is applied:
flux --context admin@mgmt-cluster get helmreleases -n openbaoshowsopenbaoReady, and the read-only checks above show the restart is waiting. -
Restart. The downtime starts here:
-
Check OpenBao.
postStartunseals it with the keys inopenbao-unseal-keys:kubectl --context admin@mgmt-cluster -n openbao get pod openbao-0 # Running, 1/1 kubectl --context admin@mgmt-cluster -n openbao logs openbao-0 -c prepare-data # the paths it deleted, if any kubectl --context admin@mgmt-cluster -n openbao exec openbao-0 -- bao status # Storage Type raft, Sealed false kubectl --context admin@mgmt-cluster -n openbao exec openbao-0 -- ls -A /openbao/data # lost+found, raft -
Check the consumers:
kubectl --context admin@mgmt-cluster get externalsecrets -A | grep -v SecretSynced # only the headerIf an
ExternalSecretstays unsynced, force a sync:kubectl --context admin@mgmt-cluster -n <ns> annotate externalsecret <name> force-sync=$(date +%s) --overwrite. -
Check the rollout: run the read-only checks again.
controller-revision-hashequalsupdateRevision, andupdatedReplicasis1/1. The alert is gone from Alertmanager within about 15 minutes.
These commands come from OpenBao backups and the incident #1542 report. They were not run while this page was written, because this machine has no cluster access.
What prepare-data deletes¶
prepare-data runs on every start of openbao-0. When /openbao/data/raft/raft/raft.db exists, it deletes everything in /openbao/data except raft and lost+found, and logs each path it deletes. The deletion cannot be undone (OpenBao backups: the migration (done)).
- The first restart after #1390 deletes the old
storage "file"data (auth,core,logical,sys). That is the restart incident #1542 is waiting for. - After that, a restart deletes nothing, unless something else has been put in
/openbao/data.
Rollback¶
A restart cannot be rolled back. To undo the change itself, revert its pull request, then run the restart window again for the reverted template. Data that prepare-data deleted does not come back. If OpenBao's data is lost, follow Manual restore.