deploy #10

Merged
bstein merged 271 commits from deploy into main 2026-01-19 19:04:01 +00:00
Showing only changes of commit cb5796cb71 - Show all commits

View File

@ -4,17 +4,17 @@ set -eu
log() { echo "[vault-k8s-auth] $*"; } log() { echo "[vault-k8s-auth] $*"; }
status_json="$(vault status -format=json || true)" status_json="$(vault status -format=json || true)"
if [[ -z "${status_json}" ]]; then if [ -z "${status_json}" ]; then
log "vault status failed; check VAULT_ADDR and VAULT_TOKEN" log "vault status failed; check VAULT_ADDR and VAULT_TOKEN"
exit 1 exit 1
fi fi
if ! grep -q '"initialized":true' <<<"${status_json}"; then if ! printf '%s' "${status_json}" | grep -q '"initialized":true'; then
log "vault not initialized; skipping" log "vault not initialized; skipping"
exit 0 exit 0
fi fi
if grep -q '"sealed":true' <<<"${status_json}"; then if printf '%s' "${status_json}" | grep -q '"sealed":true'; then
log "vault sealed; skipping" log "vault sealed; skipping"
exit 0 exit 0
fi fi