OS
Schema Hub

ContainerRestartRule

ContainerRestartRule describes how a container exit is handled.

Schema URL
https://raw.githubusercontent.com/nlamirault/schema-hub/main/schemas/core.api.k8s.io/ContainerRestartRule_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/ContainerRestartRule_v1.json
kubeconform
kubeconform -schema-location 'https://raw.githubusercontent.com/nlamirault/schema-hub/main/schemas/{{ .Group }}/{{ .ResourceKind }}_{{ .ResourceAPIVersion }}.json' manifest.yaml

Resource Structure

actionstringRequired
Specifies the action taken on a container exit if the requirements are satisfied. The only possible value is "Restart" to restart the container.
exitCodesobject
Represents the exit codes to check on container exits.