Track and persist restore volume info

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
This commit is contained in:
Daniel Jiang
2024-04-08 01:32:37 +08:00
parent 500e5aeeca
commit 0a280e5786
33 changed files with 1116 additions and 387 deletions

View File

@@ -61,3 +61,9 @@ func NewListOptionsForBackup(name string) metav1.ListOptions {
LabelSelector: fmt.Sprintf("%s=%s", velerov1api.BackupNameLabel, GetValidName(name)),
}
}
// NewSelectorForRestore returns a Selector based on the restore name.
// This is useful for interacting with Listers that need a Selector.
func NewSelectorForRestore(name string) labels.Selector {
return labels.SelectorFromSet(map[string]string{velerov1api.RestoreNameLabel: GetValidName(name)})
}