Skip to content

0019 - OpenBao on Integrated Storage (Raft) Instead of the file Backend

Status

Proposed in Taskbase task #1377. The owner asked for this record on 2026-10-21. It is accepted when its pull request is merged.

Date

2026-10-21

Context

OpenBao is Tier 0. It holds every platform secret, every ExternalSecret reads from it, and the cluster cannot be rebuilt from Git without it. It had no backup. It runs as one instance (chart 0.8.0, OpenBao 2.1.0) with storage "file" on the volume openbao-data-pvc.

A copy of a file directory taken while OpenBao runs can be inconsistent. A backup therefore needs either OpenBao stopped or a storage backend that can take a consistent snapshot online. Running several replicas (HA) is out of scope.

Options considered

  • A: Integrated Storage (Raft), single node. Migrate once with bao operator migrate, then take the nightly backup online with bao operator raft snapshot save.
  • B: Stay on file, with stop-and-copy. Scale OpenBao to 0 every night, copy the data directory, and scale it up again.

Decision

Chosen option: A. These sources back it:

  • Raft is OpenBao's production storage backend (Integrated Storage).
  • The snapshot API reads a consistent copy online, and the backup token needs only read on sys/storage/raft/snapshot.
  • bao operator migrate copies the data offline and leaves the source untouched apart from a lock key (operator migrate).

B would stop every ExternalSecret refresh and every login each night. Its backup Job would also need rights to scale the StatefulSet and to read the data volume.

The steps, the rollback and the runbook are in OpenBao backups.

Consequences

Positive

  • Nightly snapshots are taken online, and the backup token can do nothing else.
  • The restore is the documented bao operator raft snapshot restore. A monthly drill proves it works.
  • Raft is also the path to HA later. HA is not part of this record.

Negative

  • One planned downtime for the migration. The chart's StatefulSet uses OnDelete, so the migration runs only when a person deletes openbao-0. The downtime is about a minute.
  • Rollback during the transition. The file data stays untouched on the existing volume next to the new raft directory. Reverting the change and deleting the pod brings OpenBao back on file. Writes made after the migration are then lost, unless they are taken from a snapshot. Follow-up #1390 removes the old data and the migration init container after a drill has passed.
  • The backup and the drill depend on a one-time setup in OpenBao: the AppRole, its policy and the canary (#1389).
  • Task #1377 and its pull request. Follow-ups: #1389 (setup and migration window), #1390 (remove the old file data).
  • Unseal keys stored offline: #1378.
  • Backups, ADR 0018 (alert format).