Skip to content

Commit bacfd53

Browse files
committed
Fix oc get rolebindingrestrictions formatting
Print the "NAMESPACE" column in the output of `oc get rolebindingrestrictions --all-namespaces`. Before: $ oc get rolebindingrestrictions --all-namespaces NAMESPACE NAME SUBJECT TYPE SUBJECTS match-own-admin-user User carol match-own-service-accounts ServiceAccount carolproject/* After: $ oc get rolebindingrestrictions --all-namespaces NAMESPACE NAME SUBJECT TYPE SUBJECTS carolproject match-own-admin-user User carol carolproject match-own-service-accounts ServiceAccount carolproject/*
1 parent 4a5fb49 commit bacfd53

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/cmd/cli/describe/printer.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,11 @@ func printRoleBindingRestriction(rbr *authorizationapi.RoleBindingRestriction, w
11061106
}
11071107
}
11081108

1109+
if options.WithNamespace {
1110+
if _, err := fmt.Fprintf(w, "%s\t", rbr.Namespace); err != nil {
1111+
return err
1112+
}
1113+
}
11091114
if _, err := fmt.Fprintf(w, "%s", name); err != nil {
11101115
return err
11111116
}

0 commit comments

Comments
 (0)