Skip to content

Commit 8984706

Browse files
authored
Merge pull request #8925 from k8s-infra-cherrypick-robot/cherry-pick-8910-to-cluster-autoscaler-release-1.30
[cluster-autoscaler-release-1.30] Add new AWS provider label that needs to be ignored
2 parents 685efe4 + 8cfa17c commit 8984706

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

cluster-autoscaler/processors/nodegroupset/aws_nodegroups.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ func CreateAwsNodeInfoComparator(extraIgnoredLabels []string, ratioOpts config.N
3232
"k8s.amazonaws.com/eniConfig": true, // this is a label used by the AWS CNI for custom networking.
3333
"lifecycle": true, // this is a label used by the AWS for spot.
3434
"topology.ebs.csi.aws.com/zone": true, // this is a label used by the AWS EBS CSI driver as a target for Persistent Volume Node Affinity
35+
"topology.k8s.aws/zone-id": true, // this is a label used to determine the location of resources in an account relative to those in another one
3536
}
3637

3738
for k, v := range BasicIgnoredLabels {

cluster-autoscaler/processors/nodegroupset/aws_nodegroups_test.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,27 @@ func TestIsAwsNodeInfoSimilar(t *testing.T) {
162162
value2: "bar",
163163
removeOneLabel: true,
164164
},
165+
{
166+
description: "topology.k8s.aws/zone-id empty value",
167+
label: "topology.k8s.aws/zone-id",
168+
value1: "",
169+
value2: "",
170+
removeOneLabel: false,
171+
},
172+
{
173+
description: "topology.k8s.aws/zone-id different values",
174+
label: "topology.k8s.aws/zone-id",
175+
value1: "foo",
176+
value2: "bar",
177+
removeOneLabel: false,
178+
},
179+
{
180+
description: "topology.k8s.aws/zone-id one node labeled",
181+
label: "topology.k8s.aws/zone-id",
182+
value1: "foo",
183+
value2: "bar",
184+
removeOneLabel: true,
185+
},
165186
} {
166187
t.Run(tc.description, func(t *testing.T) {
167188
node1.ObjectMeta.Labels[tc.label] = tc.value1

0 commit comments

Comments
 (0)