OS
Schema Hub

LifecycleHandler

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.

Schema URL
https://raw.githubusercontent.com/nlamirault/schema-hub/main/schemas/core.api.k8s.io/LifecycleHandler_v1.json
Usage examples
VS Code / yaml-language-server
# yaml-language-server: $schema=https://raw.githubusercontent.com/nlamirault/schema-hub/main/schemas/core.api.k8s.io/LifecycleHandler_v1.json
kubeconform
kubeconform -schema-location 'https://raw.githubusercontent.com/nlamirault/schema-hub/main/schemas/{{ .Group }}/{{ .ResourceKind }}_{{ .ResourceAPIVersion }}.json' manifest.yaml

Resource Structure

execobject
Exec specifies a command to execute in the container.
httpGetobject
HTTPGet specifies an HTTP GET request to perform.
sleepobject
Sleep represents a duration that the container should sleep.
tcpSocketobject
Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for backward compatibility. There is no validation of this field and lifecycle hooks will fail at runtime when it is specified.