Skip to content

bug: a Vault update never overwrites secrets Vault already has - #777

Merged
lukepolo merged 3 commits into
mainfrom
bug/vault-migrate-keeps-existing
Nov 11, 2026
Merged

lukepolo merged 3 commits into
mainfrom
bug/vault-migrate-keeps-existing

Conversation

@lukepolo

@lukepolo lukepolo commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

An update on a Vault install generated values for keys its local env file lacked and patched them over the ones already in Vault, so running pods and new pods disagreed on the password.

  • migrate_secrets_to_vault keeps a key Vault already has (an empty one counts as missing) and still flips the local value to VAULT
  • a local value that differs from Vault's is saved to the .backup file instead of dropped
  • K3S_TOKEN and TAILSCALE_SECRET_ID come from the server itself, so they still replace Vault's
  • a key Vault can't be read for is left alone, and a new path is only created with kv put -cas=0, so a failed read never empties or overwrites anything

@lukepolo
lukepolo merged commit 43e8102 into main Nov 11, 2026
2 checks passed
@lukepolo
lukepolo deleted the bug/vault-migrate-keeps-existing branch November 11, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant