Feature Request: Add terminationGracePeriodSeconds field in liveness probe
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 1.2k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 2
Description
/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](https://knative.dev/docs/serving/configuration/config-defaults/#revision-timeout-seconds). 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.
Contributor guide
Assessment
This issue has not been assessed yet.