mirror of https://github.com/k3s-io/k3s
Merge pull request #74160 from mikedanese/updatedoc
clarify PreStop hook intended behavior in docpull/564/head
commit
f08b2b8864
|
@ -7725,7 +7725,7 @@
|
|||
},
|
||||
"preStop": {
|
||||
"$ref": "#/definitions/io.k8s.api.core.v1.Handler",
|
||||
"description": "PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks"
|
||||
"description": "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. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
|
|
|
@ -2035,8 +2035,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
|
||||
}
|
||||
|
|
|
@ -1636,11 +1636,15 @@ message Lifecycle {
|
|||
// +optional
|
||||
optional Handler postStart = 1;
|
||||
|
||||
// PreStop is called immediately before a container is terminated.
|
||||
// The container is terminated after the handler completes.
|
||||
// The reason for termination is passed to the handler.
|
||||
// Regardless of the outcome of the handler, the container is eventually terminated.
|
||||
// Other management of the container blocks until the hook completes.
|
||||
// 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.
|
||||
// More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
|
||||
// +optional
|
||||
optional Handler preStop = 2;
|
||||
|
|
|
@ -2228,11 +2228,15 @@ type Lifecycle struct {
|
|||
// More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
|
||||
// +optional
|
||||
PostStart *Handler `json:"postStart,omitempty" protobuf:"bytes,1,opt,name=postStart"`
|
||||
// PreStop is called immediately before a container is terminated.
|
||||
// The container is terminated after the handler completes.
|
||||
// The reason for termination is passed to the handler.
|
||||
// Regardless of the outcome of the handler, the container is eventually terminated.
|
||||
// Other management of the container blocks until the hook completes.
|
||||
// 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.
|
||||
// More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
|
||||
// +optional
|
||||
PreStop *Handler `json:"preStop,omitempty" protobuf:"bytes,2,opt,name=preStop"`
|
||||
|
|
|
@ -824,7 +824,7 @@ func (KeyToPath) SwaggerDoc() map[string]string {
|
|||
var map_Lifecycle = map[string]string{
|
||||
"": "Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.",
|
||||
"postStart": "PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks",
|
||||
"preStop": "PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks",
|
||||
"preStop": "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. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks",
|
||||
}
|
||||
|
||||
func (Lifecycle) SwaggerDoc() map[string]string {
|
||||
|
|
Loading…
Reference in New Issue