1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-28 14:41:10 +01:00

add argument to remove only pods violating specific node taints

This commit is contained in:
etoster
2024-02-12 15:01:53 +01:00
parent a5f322521e
commit b7697869f2
11 changed files with 122 additions and 4 deletions

View File

@@ -54,6 +54,21 @@ func TestValidateRemovePodsViolatingNodeTaintsArgs(t *testing.T) {
},
expectError: true,
},
{
description: "valid taint filters, no errors",
args: &RemovePodsViolatingNodeTaintsArgs{
ExcludedTaints: []string{"testTaint1=test1"},
},
expectError: false,
},
{
description: "invalid taint filters args, expects errors",
args: &RemovePodsViolatingNodeTaintsArgs{
ExcludedTaints: []string{"do-not-evict"},
IncludedTaints: []string{"testTaint1=test1"},
},
expectError: true,
},
}
for _, tc := range testCases {