Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update node annotation used to limit log spam with valid key #6301

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cluster-autoscaler/cloudprovider/aws/aws_cloud_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
Loading