Skip to content

Commit

Permalink
clarify the wording for restore describe for namespaces included (#2449)
Browse files Browse the repository at this point in the history
* 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 #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>
  • Loading branch information
raghavendrabhat and ashish-amarnath committed Apr 24, 2020
1 parent 962f5d6 commit 98d2fc7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelogs/unreleased/1918-raghavendrabhat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
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.
4 changes: 3 additions & 1 deletion pkg/cmd/util/output/restore_describer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, ", ")
}
Expand Down

0 comments on commit 98d2fc7

Please sign in to comment.