Skip to content

Feature Request: Add terminationGracePeriodSeconds field in liveness probe #15823

@gane5hvarma

Description

@gane5hvarma

/area API
/kind good-first-issue
/kind spec

Describe the feature

The kubernetes pod spec allows us to mention terminationGracePeriodSeconds under livenessProbe for a specific container. This helps restarting a failed container. Current the knative service spec ignores this field.

docs for reference: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#probe-level-terminationgraceperiodseconds

My use case:
The liveness probe for the container fails and the container receives a sigterm. The container code went into a deadlock and doesnt respect gracefull shutdown. Now the container waits for pod terminationGracePeriodSeconds which is set by knative. This is taking around 300 second for the pod to restart. I dont want this to setting because of request timeout, but want the container to restart as soon as liveness probe fails.

Metadata

Metadata

Assignees

Labels

area/APIAPI objects and controllerskind/featureWell-understood/specified features, ready for coding.kind/good-first-issueDenotes an issue ready for a new contributor.kind/specDiscussion of how a feature should be exposed to customers.triage/acceptedIssues which should be fixed (post-triage)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions