feat: adopt externally-provided server key (survive namespace rebuild)#9
Draft
mxhob1 wants to merge 1 commit into
Draft
feat: adopt externally-provided server key (survive namespace rebuild)#9mxhob1 wants to merge 1 commit into
mxhob1 wants to merge 1 commit into
Conversation
… wireguard Secret instead of minting when annotated vpn.wireguard-operator.io/server-key-source=external; derive pubkey if only privateKey seeded
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends the peer key-provenance pattern (#2 / 347f8a7) to the SERVER key — the one place it was missed. On a namespace rebuild the operator currently mints a NEW server key (wireguard_controller.go:852 unconditional GeneratePrivateKey), so every peer breaks (they hold the old server pubkey). Fix: when a Wireguard CR is annotated
vpn.wireguard-operator.io/server-key-source: external, the reconciler waits (requeue) for external-secrets to create thewireguardSecret and adopts it, instead of minting; and it derives the pubkey if ESO seeded only the privateKey. Build+vet clean. Tests run in CI (envtest needs KUBEBUILDER_ASSETS). DRAFT — branch-only, rolls to prod in a maintenance window (image pin stays ba5f12d). 🤖 Generated with Claude Code