Repository navigation
Add compatibility with GKE in-place node upgrades - #182
Open
benhoskings wants to merge 1 commit into
Open
benhoskings wants to merge 1 commit into
benhoskings wants to merge 1 commit into
Conversation
kubeip replaced the node's access config with one named "External IP", whereas GKE nodes use "external-nat". Access config names are immutable, so the managed instance group could no longer update the instance in place, breaking GKE in-place node upgrades and instance repairs. Reuse the existing access config's name for its replacement, falling back to the defaults when the instance has none. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
I had Claude Opus 5.5 author this PR as part of a diagnosis into a failed terraform apply.
Context:
GKE in-place node upgrades were released earlier this month:
https://docs.cloud.google.com/kubernetes-engine/docs/release-notes#October_16_2026
Problem
When kubeip swaps a node's ephemeral IP for a reserved one, it deletes the
node's access config and adds a new one, always named
External IP. GKEcreates node access configs named
external-nat.Access config names are immutable, so once kubeip has renamed it, the managed
instance group can no longer update the instance in place to match its
template. Any in-place update fails, for example a GKE surge upgrade with
maxUnavailable > 0, or an instance repair withforceUpdateOnRepair:The instance is then stuck
RECREATING, the MIG never stabilises, and the GKEnode pool upgrade (and any other node pool update, such as label or taint
changes) fails with
Not all instances running in IGM.Change
Capture the name of the instance's existing access config before deleting it,
and reuse it for the replacement in
Assign,UnassignandRestoreAddress.When the instance has no access config, the existing defaults (
External IP/External IPv6) are still used.AddInstanceAddress(on the internalinternalAssignerinterface) gains anaccessConfigNameparameter. The pinned mockery v2.35.2 panics under Go 1.26,so the
InternalAssignermock was updated by hand to match mockery's output.Testing
go test ./...golangci-lint run -c .golangci.yaml ./...(v2.13.2): 0 issuesAssigntest now expects the existing access config name to bepreserved, and
getAccessConfigNamehas its own table test.