clarify PreStop hook intended behavior in doc

This commit is contained in:
Mike Danese
2019-02-15 23:25:28 -08:00
parent e4db1471f1
commit 729ed4e67d
5 changed files with 29 additions and 14 deletions

View File

@@ -2028,8 +2028,15 @@ type Lifecycle struct {
// is terminated and restarted.
// +optional
PostStart *Handler
// PreStop is called immediately before a container is terminated. The reason for termination is
// passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated.
// PreStop is called immediately before a container is terminated due to an
// API request or management event such as liveness probe failure,
// preemption, resource contention, etc. The handler is not called if the
// container crashes or exits. The reason for termination is passed to the
// handler. The Pod's termination grace period countdown begins before the
// PreStop hooked is executed. Regardless of the outcome of the handler, the
// container will eventually terminate within the Pod's termination grace
// period. Other management of the container blocks until the hook completes
// or until the termination grace period is reached.
// +optional
PreStop *Handler
}