Improve EKS autoscaler image tag selection#95
Open
vrutz wants to merge 3 commits into
Open
Conversation
…on in autoscaler configuration
vrutz
commented
Jun 25, 2026
… version + add override for airgapped envs
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.
Autoscaler Image Selection Test Plan
PR Scope
Validate that the EKS plugin can select a cluster autoscaler image without relying only on a hardcoded Kubernetes-to-autoscaler map.
The change covers:
Sources
https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html#available-versions
https://github.com/kubernetes/autoscaler/tags
registry.k8s.io/autoscaling/cluster-autoscalerPreflight
Confirm the Kubernetes versions are available in the target AWS region before creating EKS clusters:
For this PR, prioritize currently supported EKS versions that exercise the selector behavior:
1.35: expected to have a matching autoscaler tag.1.33: expected to have a matching autoscaler tag and verifies non-latest supported minors.1.36: expected to exercise the fallback path if nov1.36.xautoscaler tag is published.Do not add
1.11or1.12E2E clusters unless an existing legacy environment is already available. They are outside the practical EKS coverage for this PR.Private ECR Setup
Create or reuse one ECR repository whose path matches the image path built by the plugin:
Example setup:
Push only the images needed by the private-registry override scenarios:
Ensure the worker node role can pull from the private ECR repository:
ecr:GetAuthorizationTokenecr:BatchCheckLayerAvailabilityecr:BatchGetImageecr:GetDownloadUrlForLayerAlso ensure the worker node role has the AWS permissions required by cluster autoscaler itself. The plugin deploys the upstream AWS cloud-provider autoscaler manifest; at runtime the pod must be able to inspect and update Auto Scaling Groups. If the cluster or node group was not created with the usual autoscaling permissions, attach a policy that allows the autoscaler actions needed for EKS node groups, including:
autoscaling:DescribeAutoScalingGroupsautoscaling:DescribeAutoScalingInstancesautoscaling:DescribeLaunchConfigurationsautoscaling:DescribeScalingActivitiesautoscaling:DescribeTagsautoscaling:SetDesiredCapacityautoscaling:TerminateInstanceInAutoScalingGroupec2:DescribeInstanceTypesec2:DescribeLaunchTemplateVersionsIf pushing from a DSS instance or test instance, that role also needs push permissions such as:
ecr:InitiateLayerUploadecr:UploadLayerPartecr:CompleteLayerUploadecr:PutImageE2E Scenarios
Public Registry, Matching Version
Create a plugin-managed EKS
1.35cluster with autoscaling enabled and noautoscalerImageTagOverride.Expected result:
v1.35.xtag;Repeat with EKS
1.33.Expected result:
v1.33.xtag;Public Registry, Missing Matching Version
Create a plugin-managed EKS
1.36cluster with autoscaling enabled and noautoscalerImageTagOverride.Expected result if no
v1.36.xautoscaler image is published:v1.36.xtag is selected;v1.35.0;Private ECR, Explicit Override
Create or update an EKS
1.35cluster using:Expected result:
$ECR_REGISTRY/autoscaling/cluster-autoscaler:dss-qa-1_35;vX.Y.Z.Repeat with:
Expected result:
$ECR_REGISTRY/autoscaling/cluster-autoscaler:v1.35;Private ECR, No Override
Create or update an EKS
1.35cluster using:Do not set
autoscalerImageTagOverride.Expected result:
/v2/autoscaling/cluster-autoscaler/tags/listendpoint, discovery fails;1.35is selected;$ECR_REGISTRY/autoscaling/cluster-autoscaler:v1.35.0;Validation Commands
Check the deployed autoscaler image:
kubectl -n kube-system get deployment cluster-autoscaler \ -o jsonpath='{.spec.template.spec.containers[0].image}'Check autoscaler pod health:
Check autoscaler logs:
Check plugin logs for:
Cleanup
Out Of Scope