-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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. 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.