Adding support for upgrading eks hybrid nodes on EKS clusters#8719
Adding support for upgrading eks hybrid nodes on EKS clusters#8719pokearu wants to merge 2 commits intoeksctl-io:mainfrom
Conversation
|
Hello pokearu 👋 Thank you for opening a Pull Request in |
| if rnc.RemotePodNetworks != nil && len(rnc.RemotePodNetworks) == 0 { | ||
| return nil | ||
| } | ||
| return setNonEmpty("remoteNetworkConfig.remoteNodeNetworks") |
There was a problem hiding this comment.
should we validate this for create vs update?
There was a problem hiding this comment.
Good question! This check is needed for the upgrade cluster path — the "remove all remote networks" case requires both-empty lists, and upgrade does go through ValidateClusterConfig via NewProviderForExistingCluster → InitializeClusterConfig.
For creates, this is a no-op — the CFN builder gates on HasRemoteNetworkingConfigured() which returns false when both lists are empty, so remoteNetworkConfig never makes it into the template. The EKS API would also reject it anyway.
We considered adding create/update context to the validation path but it felt like unnecessary complexity for a harmless no-op. I'll add a warning log when both-empty is detected so users aren't silently confused.
Description
Adds support for updating
remoteNetworkConfigon existing EKS clusters througheksctl upgrade cluster. Previously, remote network config could only be set during cluster creation — this change allows users to enable hybrid nodes, update CIDRs, or remove remote networks on existing clusters.What this does:
updateRemoteNetworkConfigto theUpgradeflow inowned.go, called between version upgrade and CFN stack updateremoteNetworkConfigdirectly to the EKSUpdateClusterConfigAPI.[]sends an empty array (removes)remoteNodeNetworks: []andremotePodNetworks: []simultaneously (the "remove all" case), matching the EKS API'svalidateRemoteNetworkConfigUpdateRequestbehaviorUsage:
Design decisions:
• Lives in upgrade cluster (not a utils command) because enabling hybrid nodes also requires CFN resources (VPC routes, IAM roles) which AppendNewClusterStackResource handles
• No client-side re-implementation of API validations — bad input gets clear API errors
• No defaulting — omitting remotePodNetworks sends nil (no change), setting it to [] sends empty (remove)
Testing
Checklist
README.md, or theuserdocsdirectory)area/nodegroup) and kind (e.g.kind/improvement)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯