Validate that readiness probes can't set terminationGracePeriodSeconds

This commit is contained in:
Elana Hashman
2021-03-09 10:19:18 -08:00
parent 9cdd673a8b
commit 81cfbccea4
2 changed files with 19 additions and 0 deletions

View File

@@ -6284,6 +6284,20 @@ func TestValidateContainers(t *testing.T) {
TerminationMessagePolicy: "File",
},
},
"invalid readiness probe, terminationGracePeriodSeconds set.": {
{
Name: "life-123",
Image: "image",
ReadinessProbe: &core.Probe{
Handler: core.Handler{
TCPSocket: &core.TCPSocketAction{},
},
TerminationGracePeriodSeconds: utilpointer.Int64Ptr(10),
},
ImagePullPolicy: "IfNotPresent",
TerminationMessagePolicy: "File",
},
},
"invalid liveness probe, no tcp socket port.": {
{
Name: "life-123",