Enforce nodeName cannot be set along with non empty schedulingGates

This commit is contained in:
Wei Huang
2023-02-06 22:09:16 -08:00
parent dfb976e25a
commit feed8c683d
4 changed files with 36 additions and 31 deletions

View File

@@ -10817,7 +10817,7 @@ func TestValidatePodCreateWithSchedulingGates(t *testing.T) {
},
},
featureEnabled: false,
wantFieldErrors: nil,
wantFieldErrors: []*field.Error{field.Forbidden(fldPath.Child("nodeName"), "cannot be set until all schedulingGates have been cleared")},
},
{
name: "create a Pod with nodeName and schedulingGates, feature enabled",