Struct k8s_openapi::v1_8::api::core::v1::Lifecycle[][src]

pub struct Lifecycle {
    pub post_start: Option<Handler>,
    pub pre_stop: Option<Handler>,
}

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.

Fields

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 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

Trait Implementations

impl Clone for Lifecycle
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Lifecycle
[src]

Formats the value using the given formatter. Read more

impl Default for Lifecycle
[src]

Returns the "default value" for a type. Read more

impl PartialEq for Lifecycle
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'de> Deserialize<'de> for Lifecycle
[src]

Deserialize this value from the given Serde deserializer. Read more

impl Serialize for Lifecycle
[src]

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

impl Send for Lifecycle

impl Sync for Lifecycle