mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 02:38:12 +00:00
Tighten validation on the qosClass field of pod status
This commit is contained in:
@@ -14454,6 +14454,32 @@ func TestValidatePodStatusUpdate(t *testing.T) {
|
||||
),
|
||||
"",
|
||||
"restartable init container can restart if RestartPolicyAlways",
|
||||
}, {
|
||||
*podtest.MakePod("foo",
|
||||
podtest.SetStatus(core.PodStatus{
|
||||
QOSClass: core.PodQOSBurstable,
|
||||
}),
|
||||
),
|
||||
*podtest.MakePod("foo",
|
||||
podtest.SetStatus(core.PodStatus{
|
||||
QOSClass: core.PodQOSGuaranteed,
|
||||
}),
|
||||
),
|
||||
"tatus.qosClass: Invalid value: \"Burstable\": field is immutable",
|
||||
"qosClass can not be changed",
|
||||
}, {
|
||||
*podtest.MakePod("foo",
|
||||
podtest.SetStatus(core.PodStatus{
|
||||
QOSClass: core.PodQOSBurstable,
|
||||
}),
|
||||
),
|
||||
*podtest.MakePod("foo",
|
||||
podtest.SetStatus(core.PodStatus{
|
||||
QOSClass: core.PodQOSBurstable,
|
||||
}),
|
||||
),
|
||||
"",
|
||||
"qosClass no change",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user