mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-15 11:46:06 +00:00
🐛 Make init and exec restore hooks as omitempty in restore hookSpec (#2793)
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
Make init and exec restore hooks as optional in restore hookSpec
|
||||
|
||||
@@ -1466,9 +1466,6 @@ spec:
|
||||
to complete.
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- exec
|
||||
- init
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -135,10 +135,10 @@ type RestoreResourceHookSpec struct {
|
||||
// RestoreResourceHook defines a restore hook for a resource.
|
||||
type RestoreResourceHook struct {
|
||||
// Exec defines an exec restore hook.
|
||||
Exec *ExecRestoreHook `json:"exec"`
|
||||
Exec *ExecRestoreHook `json:"exec,omitempty"`
|
||||
|
||||
// Init defines an init restore hook.
|
||||
Init *InitRestoreHook `json:"init"`
|
||||
Init *InitRestoreHook `json:"init,omitempty"`
|
||||
}
|
||||
|
||||
// ExecRestoreHook is a hook that uses pod exec API to execute a command inside a container in a pod
|
||||
|
||||
Reference in New Issue
Block a user