Skip to content

fix(aws-eks): nodegroup scaling defaults and apply version updates when they settle - #1373

Merged
NitinKumar004 merged 1 commit into
developmentfrom
fix/aws-eks-scaling-defaults-version-settle
Sep 27, 2026
Merged

NitinKumar004 merged 1 commit into
developmentfrom
fix/aws-eks-scaling-defaults-version-settle

Conversation

@NitinKumar004

Copy link
Copy Markdown
Collaborator

Two EKS fixes (tracker rows EKS-X7 and EKS-X10).

EKS-X7: nodegroup scaling defaults and validation

CreateNodegroup without a scalingConfig used to store 0/0/0, so the nodegroup had no nodes. Real EKS defaults to minSize 1, maxSize 2, desiredSize 2. The provider now applies that default, and with the node sync from desiredSize a default nodegroup brings up 2 Nodes.

Validation now follows the API docs and the messages EKS returns:

  • minSize and desiredSize at least 0, maxSize between 1 and 450 (the default "Nodes per managed node group" quota)
  • Minimum capacity X can't be greater than desired size Y / desired capacity X can't be greater than max size Y
  • CreateNodegroup takes all three sizes or none; a partial scalingConfig is an InvalidParameterException
  • UpdateNodegroupConfig with a partial scalingConfig is merged onto the current sizes inside the provider, under its lock, and the merged result is validated. The wire handler no longer does a Describe and merge itself.

Driver change: NodegroupConfig.ScalingConfig is now a pointer (nil means default), and NodegroupConfigUpdate.Scaling is a new NodegroupScalingUpdate with optional sizes.

EKS-X10: version updates apply when the update settles

With --async-settle, UpdateClusterVersion changed the cluster version and the data plane's /version right away, while the update was still in progress. Real EKS keeps reporting the old version until the update completes. Now:

  • DescribeCluster reports the old version while the cluster is UPDATING, then the new one once it settles
  • /version switches at the same moment. The data plane gets a new SetClusterVersionAt, which holds the current version until a given time on the caller's clock. Snapshots store the target version.
  • UpdateNodegroupVersion works the same way: the nodegroup keeps its old version and release version until its update settles
  • update records from cluster and nodegroup config/version updates read InProgress in the response and in DescribeUpdate until the change settles, then Successful
  • nodegroup and add-on version resolution uses the version the control plane actually runs, so a nodegroup can't move to 1.32 while the cluster is still upgrading to it

With async settle off, all of this stays immediate as before.

Verification

  • New tests (FakeClock for settle): nodegroup_scaling_test.go, version_settle_test.go, sdk_nodegroup_scaling_test.go, and TestServerVersion_ScheduledSwitch. Each fails on the old code.
  • go build, go vet, and go test -race on providers/aws/eks, server/aws/eks, services/kubernetes and persist; golangci-lint with --new-from-rev shows 0 issues.
  • cloudemu serve --async-settle with the aws CLI and kubectl: create-nodegroup with no scaling config gives min 1/max 2/desired 2 and 2 nodes in kubectl get nodes; a partial config is rejected. After update-cluster-version, describe-update is InProgress while describe-cluster shows 1.31 UPDATING and kubectl version shows v1.31.x. Both switch to 1.32 once describe-update reads Successful. update-nodegroup-version behaves the same way.
  • Terraform aws_eks_node_group requires scaling_config in the provider, so it was tested with one: apply, plan clean, in-place cluster upgrade 1.31 to 1.32 with desired_size 2 to 3, plan clean, destroy.

@NitinKumar004
NitinKumar004 marked this pull request as ready for review September 27, 2026 12:50
@NitinKumar004
NitinKumar004 merged commit 4fec7ec into development Sep 27, 2026
23 checks passed
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