Fix unseal в сервисе openbao-init в compose.yaml

This commit is contained in:
vasyukova
2026-11-06 13:22:27 +03:00
parent 1c5c1b3368
commit 7c223b97d9
+3
View File
@@ -219,6 +219,9 @@ services:
UNSEAL=$$(jq -r '.unseal_keys_b64[0]' /secrets/bao-init.json)
ROOT=$$(jq -r '.root_token' /secrets/bao-init.json)
# lab7 fix: unseal выполняется ВСЕГДА, а не только при первой
# инициализации. После рестарта openbao sealed, и без unseal
# `bao policy write` падает с 503 "Vault is sealed".
# unseal идемпотентен: на уже распечатанном хранилище вернёт
# «Vault is already unsealed», это ок (|| true).
bao operator unseal "$$UNSEAL" >/dev/null 2>&1 || true