Skip to content

Commit

Permalink
Generated changes for probe terminationGracePeriodSeconds
Browse files Browse the repository at this point in the history
  • Loading branch information
ehashman committed Mar 12, 2021
1 parent 06e634e commit 7df1259
Show file tree
Hide file tree
Showing 74 changed files with 17,716 additions and 17,164 deletions.
7 changes: 6 additions & 1 deletion api/openapi-spec/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/api/pod/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ func probeGracePeriodInUse(podSpec *api.PodSpec) bool {
VisitContainers(podSpec, AllContainers, func(c *api.Container, containerType ContainerType) bool {
// cannot be set for readiness probes
if (c.LivenessProbe != nil && c.LivenessProbe.TerminationGracePeriodSeconds != nil) ||
(c.StartupProbe != nil && c.StartupProbe.TerminationGracePeriodSeconds != nil) {
(c.StartupProbe != nil && c.StartupProbe.TerminationGracePeriodSeconds != nil) {
inUse = true
return false
}
Expand Down
14 changes: 7 additions & 7 deletions pkg/api/pod/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1146,8 +1146,8 @@ func TestDropProbeGracePeriod(t *testing.T) {
podWithProbeGracePeriod := func() *api.Pod {
return &api.Pod{
Spec: api.PodSpec{
RestartPolicy: api.RestartPolicyNever,
Containers: []api.Container{{Name: "container1", Image: "testimage", LivenessProbe: &probe, StartupProbe: &probe}},
RestartPolicy: api.RestartPolicyNever,
Containers: []api.Container{{Name: "container1", Image: "testimage", LivenessProbe: &probe, StartupProbe: &probe}},
},
}
}
Expand Down Expand Up @@ -1176,11 +1176,11 @@ func TestDropProbeGracePeriod(t *testing.T) {
{
description: "only has liveness probe-level terminationGracePeriod",
hasGracePeriod: true,
pod: func() *api.Pod {
p := podWithProbeGracePeriod()
p.Spec.Containers[0].StartupProbe.TerminationGracePeriodSeconds = nil
return p
},
pod: func() *api.Pod {
p := podWithProbeGracePeriod()
p.Spec.Containers[0].StartupProbe.TerminationGracePeriodSeconds = nil
return p
},
},
{
description: "is nil",
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/core/v1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pkg/apis/core/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7df1259

Please sign in to comment.