Add SkipDefaultResourceModifier field to RestoreSpec

Add *bool field following existing RestoreSpec conventions (RestorePVs,
PreserveNodePorts, IncludeClusterResources). When true, the server
default resource modifier is skipped for this restore.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
This commit is contained in:
Shubham Pampattiwar
2026-08-03 13:19:47 -07:00
parent f011fc4ef6
commit 70e70f14e2
4 changed files with 24 additions and 3 deletions
@@ -467,6 +467,14 @@ spec:
from. If specified, and BackupName is empty, Velero will restore
from the most recent successful backup created from this schedule.
type: string
skipDefaultResourceModifier:
description: |-
SkipDefaultResourceModifier controls whether the server-configured default
resource modifier is applied to this restore.
When true, the default modifier is skipped even if configured on the server.
Has no effect when a per-restore ResourceModifier is specified.
nullable: true
type: boolean
uploaderConfig:
description: UploaderConfig specifies the configuration for the restore.
nullable: true
File diff suppressed because one or more lines are too long
+8
View File
@@ -135,6 +135,14 @@ type RestoreSpec struct {
// +nullable
ResourcePolicy *corev1api.TypedLocalObjectReference `json:"resourcePolicy,omitempty"`
// SkipDefaultResourceModifier controls whether the server-configured default
// resource modifier is applied to this restore.
// When true, the default modifier is skipped even if configured on the server.
// Has no effect when a per-restore ResourceModifier is specified.
// +optional
// +nullable
SkipDefaultResourceModifier *bool `json:"skipDefaultResourceModifier,omitempty"`
// UploaderConfig specifies the configuration for the restore.
// +optional
// +nullable
@@ -1427,6 +1427,11 @@ func (in *RestoreSpec) DeepCopyInto(out *RestoreSpec) {
*out = new(corev1.TypedLocalObjectReference)
(*in).DeepCopyInto(*out)
}
if in.SkipDefaultResourceModifier != nil {
in, out := &in.SkipDefaultResourceModifier, &out.SkipDefaultResourceModifier
*out = new(bool)
**out = **in
}
if in.UploaderConfig != nil {
in, out := &in.UploaderConfig, &out.UploaderConfig
*out = new(UploaderConfigForRestore)