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.jsonkubeconform
kubeconform -schema-location 'https://raw.githubusercontent.com/nlamirault/schema-hub/main/schemas/{{ .Group }}/{{ .ResourceKind }}_{{ .ResourceAPIVersion }}.json' manifest.yamlResource Structure
execobjectExec specifies a command to execute in the container.
httpGetobjectHTTPGet specifies an HTTP GET request to perform.
sleepobjectSleep represents a duration that the container should sleep.
tcpSocketobjectDeprecated. 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.