make taints unique by <key, effect> on a node
This commit is contained in:
@@ -5329,7 +5329,6 @@ func TestValidateNode(t *testing.T) {
|
||||
},
|
||||
},
|
||||
"missing-taint-key": {
|
||||
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "dedicated-node1",
|
||||
// Add a taint with an empty key to a node
|
||||
@@ -5441,6 +5440,27 @@ func TestValidateNode(t *testing.T) {
|
||||
ExternalID: "external",
|
||||
},
|
||||
},
|
||||
"duplicated-taints-with-same-key-effect": {
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "dedicated-node1",
|
||||
// Add two taints to the node with the same key and effect; should be rejected.
|
||||
Annotations: map[string]string{
|
||||
api.TaintsAnnotationKey: `
|
||||
[{
|
||||
"key": "dedicated",
|
||||
"value": "special-user-1",
|
||||
"effect": "NoSchedule"
|
||||
}, {
|
||||
"key": "dedicated",
|
||||
"value": "special-user-2",
|
||||
"effect": "NoSchedule"
|
||||
}]`,
|
||||
},
|
||||
},
|
||||
Spec: api.NodeSpec{
|
||||
ExternalID: "external",
|
||||
},
|
||||
},
|
||||
"missing-podSignature": {
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "abc-123",
|
||||
|
Reference in New Issue
Block a user