接入 OpenBao 受鉴权监控并修复快照续期 #162

Merged
panxiao81 merged 2 commits from feat/openbao-monitoring into main 2026-09-25 20:39:32 +00:00
2 changed files with 12 additions and 1 deletions
Showing only changes of commit d65da84d2a - Show all commits
@@ -11,7 +11,7 @@ BAO_TOKEN="$(cat /etc/openbao/snapshot.token)"
export BAO_TOKEN export BAO_TOKEN
# periodic token 不会自动续期;在每日快照前续期,避免 768h 后永久失败。 # periodic token 不会自动续期;在每日快照前续期,避免 768h 后永久失败。
bao token renew -self >/dev/null bao token renew >/dev/null
dir="{{ openbao_snapshot_dir }}" dir="{{ openbao_snapshot_dir }}"
stamp="$(date +%Y%m%d-%H%M%S)" stamp="$(date +%Y%m%d-%H%M%S)"
@@ -68,3 +68,14 @@ import {
to = vault_pki_secret_backend_config_urls.this to = vault_pki_secret_backend_config_urls.this
id = "pki/config/urls" id = "pki/config/urls"
} }
# 本次维护预检先通过同名 API 配置验证,后续 Terraform 纳入既有主 state。
import {
to = vault_policy.metrics
id = "metrics"
}
import {
to = vault_kubernetes_auth_backend_role.metrics
id = "auth/kubernetes/role/metrics"
}