Modify the label used by the restore CLI to filter the PVR.
Signed-off-by: Xun Jiang <blackpigletbruce@gmail.com>pull/7467/head
parent
3b8370e13c
commit
bb4a62f3a7
|
@ -74,7 +74,7 @@ func NewDescribeCommand(f client.Factory, use string) *cobra.Command {
|
||||||
podVolumeRestoreList := new(velerov1api.PodVolumeRestoreList)
|
podVolumeRestoreList := new(velerov1api.PodVolumeRestoreList)
|
||||||
err = kbClient.List(context.TODO(), podVolumeRestoreList, &controllerclient.ListOptions{
|
err = kbClient.List(context.TODO(), podVolumeRestoreList, &controllerclient.ListOptions{
|
||||||
Namespace: f.Namespace(),
|
Namespace: f.Namespace(),
|
||||||
LabelSelector: labels.SelectorFromSet(map[string]string{velerov1api.BackupNameLabel: label.GetValidName(restore.Name)}),
|
LabelSelector: labels.SelectorFromSet(map[string]string{velerov1api.RestoreNameLabel: label.GetValidName(restore.Name)}),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "error getting PodVolumeRestores for restore %s: %v\n", restore.Name, err)
|
fmt.Fprintf(os.Stderr, "error getting PodVolumeRestores for restore %s: %v\n", restore.Name, err)
|
||||||
|
|
Loading…
Reference in New Issue