Skip to content

core.v1.lifecycle

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

Index

Fields

obj postStart

"LifecycleHandler defines a specific action that should be taken in a lifecycle hook. One and only one of the fields, except TCPSocket must be specified."

obj postStart.exec

"ExecAction describes a \"run in container\" action."

fn postStart.exec.withCommand

withCommand(command)

"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy."

fn postStart.exec.withCommandMixin

withCommandMixin(command)

"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy."

Note: This function appends passed data to existing values

obj postStart.httpGet

"HTTPGetAction describes an action based on HTTP Get requests."

fn postStart.httpGet.withHost

withHost(host)

"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead."

fn postStart.httpGet.withHttpHeaders

withHttpHeaders(httpHeaders)

"Custom headers to set in the request. HTTP allows repeated headers."

fn postStart.httpGet.withHttpHeadersMixin

withHttpHeadersMixin(httpHeaders)

"Custom headers to set in the request. HTTP allows repeated headers."

Note: This function appends passed data to existing values

fn postStart.httpGet.withPath

withPath(path)

"Path to access on the HTTP server."

fn postStart.httpGet.withPort

withPort(port)

"IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number."

fn postStart.httpGet.withScheme

withScheme(scheme)

"Scheme to use for connecting to the host. Defaults to HTTP."

obj postStart.sleep

"SleepAction describes a \"sleep\" action."

fn postStart.sleep.withSeconds

withSeconds(seconds)

"Seconds is the number of seconds to sleep."

obj postStart.tcpSocket

"TCPSocketAction describes an action based on opening a socket"

fn postStart.tcpSocket.withHost

withHost(host)

"Optional: Host name to connect to, defaults to the pod IP."

fn postStart.tcpSocket.withPort

withPort(port)

"IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number."

obj preStop

"LifecycleHandler defines a specific action that should be taken in a lifecycle hook. One and only one of the fields, except TCPSocket must be specified."

obj preStop.exec

"ExecAction describes a \"run in container\" action."

fn preStop.exec.withCommand

withCommand(command)

"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy."

fn preStop.exec.withCommandMixin

withCommandMixin(command)

"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy."

Note: This function appends passed data to existing values

obj preStop.httpGet

"HTTPGetAction describes an action based on HTTP Get requests."

fn preStop.httpGet.withHost

withHost(host)

"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead."

fn preStop.httpGet.withHttpHeaders

withHttpHeaders(httpHeaders)

"Custom headers to set in the request. HTTP allows repeated headers."

fn preStop.httpGet.withHttpHeadersMixin

withHttpHeadersMixin(httpHeaders)

"Custom headers to set in the request. HTTP allows repeated headers."

Note: This function appends passed data to existing values

fn preStop.httpGet.withPath

withPath(path)

"Path to access on the HTTP server."

fn preStop.httpGet.withPort

withPort(port)

"IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number."

fn preStop.httpGet.withScheme

withScheme(scheme)

"Scheme to use for connecting to the host. Defaults to HTTP."

obj preStop.sleep

"SleepAction describes a \"sleep\" action."

fn preStop.sleep.withSeconds

withSeconds(seconds)

"Seconds is the number of seconds to sleep."

obj preStop.tcpSocket

"TCPSocketAction describes an action based on opening a socket"

fn preStop.tcpSocket.withHost

withHost(host)

"Optional: Host name to connect to, defaults to the pod IP."

fn preStop.tcpSocket.withPort

withPort(port)

"IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number."