generated from coulomb/repo-seed
adhoc: creds-bootstrap-agent dry-run no longer dies without age key
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -88,10 +88,19 @@ if [[ ! -f "$AGE_KEY" ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
AGE_PUBKEY=$(grep 'public key:' "$AGE_KEY" | awk '{print $NF}')
|
||||
[[ -z "$AGE_PUBKEY" ]] && die "could not read public key from $AGE_KEY"
|
||||
ok "age key ready: ${AGE_PUBKEY:0:20}…"
|
||||
state_set "age_key_present" "true"
|
||||
if [[ -f "$AGE_KEY" ]]; then
|
||||
AGE_PUBKEY=$(grep 'public key:' "$AGE_KEY" | awk '{print $NF}')
|
||||
[[ -z "$AGE_PUBKEY" ]] && die "could not read public key from $AGE_KEY"
|
||||
ok "age key ready: ${AGE_PUBKEY:0:20}…"
|
||||
state_set "age_key_present" "true"
|
||||
elif [[ "$DRY_RUN" == true ]]; then
|
||||
# Dry-run on a machine without the age key (key generation was skipped
|
||||
# above): continue with a placeholder recipient so later phases can render.
|
||||
AGE_PUBKEY="age1dryrunplaceholderrecipient"
|
||||
ok "age key absent — dry-run continues with placeholder recipient"
|
||||
else
|
||||
die "could not read public key from $AGE_KEY"
|
||||
fi
|
||||
|
||||
# Cluster reachability
|
||||
if ! kubectl cluster-info &>/dev/null; then
|
||||
|
||||
Reference in New Issue
Block a user