clarify the wording for restore describe for namespaces included (#2449)

* clarify the wording for restore describe for namespaces included

Instead of showing it as "*" explicitly mention that all the namespaces
from the backup object are included.

refer to https://github.com/vmware-tanzu/velero/issues/1918

Signed-off-by: Raghavendra M <raghavendra@redhat.com>

* Update pkg/cmd/util/output/restore_describer.go

Co-Authored-By: Ashish Amarnath <ashisham@vmware.com>
Signed-off-by: Raghavendra M <raghavendra@redhat.com>

* Update pkg/cmd/util/output/restore_describer.go

Co-Authored-By: Ashish Amarnath <ashisham@vmware.com>
Signed-off-by: Raghavendra M <raghavendra@redhat.com>

Co-authored-by: Ashish Amarnath <ashisham@vmware.com>
This commit is contained in:
FNU Raghavendra Manjunath
2020-04-24 17:44:20 -04:00
committed by GitHub
parent 962f5d6859
commit 98d2fc732e
2 changed files with 7 additions and 1 deletions

View File

@@ -65,7 +65,9 @@ func DescribeRestore(restore *v1.Restore, podVolumeRestores []v1.PodVolumeRestor
d.Printf("Namespaces:\n")
var s string
if len(restore.Spec.IncludedNamespaces) == 0 {
s = "*"
s = "all namespaces found in the backup"
} else if len(restore.Spec.IncludedNamespaces) == 1 && restore.Spec.IncludedNamespaces[0] == "*" {
s = "all namespaces found in the backup"
} else {
s = strings.Join(restore.Spec.IncludedNamespaces, ", ")
}