add backup level flag to opt-in for default restic use

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
This commit is contained in:
Ashish Amarnath
2020-06-02 17:33:08 -07:00
parent c29a3a4ea0
commit 69cceb0d7e
5 changed files with 21 additions and 2 deletions

View File

@@ -82,6 +82,12 @@ type BackupSpec struct {
// VolumeSnapshotLocations is a list containing names of VolumeSnapshotLocations associated with this backup.
// +optional
VolumeSnapshotLocations []string `json:"volumeSnapshotLocations,omitempty"`
// DefaultRestic specifies whether restic should be used to take
// backup of all pod volumes by default.
// +optional
// + nullable
DefaultRestic *bool `json:"defaultRestic,omitempty"`
}
// BackupHooks contains custom behaviors that should be executed at different phases of the backup.

View File

@@ -246,6 +246,11 @@ func (in *BackupSpec) DeepCopyInto(out *BackupSpec) {
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.DefaultRestic != nil {
in, out := &in.DefaultRestic, &out.DefaultRestic
*out = new(bool)
**out = **in
}
return
}

File diff suppressed because one or more lines are too long

View File

@@ -36,6 +36,10 @@ spec:
spec:
description: BackupSpec defines the specification for a Velero backup.
properties:
defaultRestic:
description: DefaultRestic specifies whether restic should be used to
take backup of all pod volumes by default.
type: boolean
excludedNamespaces:
description: ExcludedNamespaces contains a list of namespaces that are
not included in the backup.

View File

@@ -44,6 +44,10 @@ spec:
description: Template is the definition of the Backup to be run on the
provided schedule
properties:
defaultRestic:
description: DefaultRestic specifies whether restic should be used
to take backup of all pod volumes by default.
type: boolean
excludedNamespaces:
description: ExcludedNamespaces contains a list of namespaces that
are not included in the backup.