mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 08:17:26 +00:00
StorageClass should not print the namespace column
This commit is contained in:
parent
36a5c0091b
commit
fdbdbfe0cf
@ -1867,6 +1867,10 @@ func printNetworkPolicyList(list *extensions.NetworkPolicyList, w io.Writer, opt
|
|||||||
func printStorageClass(sc *storage.StorageClass, w io.Writer, options printers.PrintOptions) error {
|
func printStorageClass(sc *storage.StorageClass, w io.Writer, options printers.PrintOptions) error {
|
||||||
name := sc.Name
|
name := sc.Name
|
||||||
|
|
||||||
|
if options.WithNamespace {
|
||||||
|
return fmt.Errorf("storageclass is not namespaced")
|
||||||
|
}
|
||||||
|
|
||||||
if storageutil.IsDefaultAnnotation(sc.ObjectMeta) {
|
if storageutil.IsDefaultAnnotation(sc.ObjectMeta) {
|
||||||
name += " (default)"
|
name += " (default)"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user