Add WaitForReady flag to check container readiness state before exec a hook

Signed-off-by: Ripolin <florent.david@gmail.com>
This commit is contained in:
Ripolin
2023-10-04 15:51:23 +02:00
committed by Florent David
parent ad114f8f65
commit e5af7f5cea
7 changed files with 182 additions and 77 deletions

View File

@@ -214,6 +214,11 @@ type ExecRestoreHook struct {
// before attempting to run the command.
// +optional
WaitTimeout metav1.Duration `json:"waitTimeout,omitempty"`
// WaitForReady ensures command will be launched when container is Ready instead of Running.
// +optional
// +nullable
WaitForReady *bool `json:"waitForReady,omitempty"`
}
// InitRestoreHook is a hook that adds an init container to a PodSpec to run commands before the