diff --git a/cluster-autoscaler/cloudprovider/aws/aws_cloud_provider.go b/cluster-autoscaler/cloudprovider/aws/aws_cloud_provider.go index ee6facccf5e4..f5ce3f8199de 100644 --- a/cluster-autoscaler/cloudprovider/aws/aws_cloud_provider.go +++ b/cluster-autoscaler/cloudprovider/aws/aws_cloud_provider.go @@ -143,7 +143,7 @@ func (aws *awsCloudProvider) HasInstance(node *apiv1.Node) (bool, error) { // Nodes that belong to an asg that is not autoscaled will not be found in the asgCache below, // so do not trigger warning spam by returning an error from being unable to find them. // Annotation is not automated, but users that see the warning can add the annotation to avoid it. - if node.Annotations != nil && node.Annotations["k8s.io/cluster-autoscaler/enabled"] == "false" { + if node.Annotations != nil && node.Annotations["k8s.io/cluster-autoscaler-enabled"] == "false" { return false, nil } diff --git a/cluster-autoscaler/cloudprovider/aws/aws_cloud_provider_test.go b/cluster-autoscaler/cloudprovider/aws/aws_cloud_provider_test.go index 1d37c15e9ad1..0033d27c68ea 100644 --- a/cluster-autoscaler/cloudprovider/aws/aws_cloud_provider_test.go +++ b/cluster-autoscaler/cloudprovider/aws/aws_cloud_provider_test.go @@ -728,7 +728,7 @@ func TestHasInstance(t *testing.T) { ObjectMeta: metav1.ObjectMeta{ Name: "node-2", Annotations: map[string]string{ - "k8s.io/cluster-autoscaler/enabled": "false", + "k8s.io/cluster-autoscaler-enabled": "false", }, }, Spec: apiv1.NodeSpec{