Migrating OpenBao to static key auto-unseal

A deployment that was initialized with Shamir keys can migrate to static key auto-unseal, so that the replicas unseal themselves after a restart.

The migration is one way: after the migration the former unseal keys become recovery keys.

  1. Confirm that the deployed flux-latest artifact mounts the ccf-openbao-seal Secret into the OpenBao release.
  2. Set the following values in bootstrap.env.
    VAULT_UNSEAL_MODE=auto
    VAULT_SEAL_MIGRATE=true
  3. Run the vault phase.
    docker run -it --rm \
      -v "$(pwd)":/config \
      -v ~/.kube/config:/root/.kube/config:ro \
      --network host \
      container.repository.cloudera.com/cloudera/ccf-install:<TAG> \
      --phase vault --yes
  4. Run the migration commands that the installer prints.

    The installer prints the vault operator unseal -migrate commands and does not apply the keys itself.

  5. Set VAULT_SEAL_MIGRATE back to false in bootstrap.env.
    VAULT_SEAL_MIGRATE=false

Each replica now unseals itself from the ccf-openbao-seal Secret after a restart.