StorageClass should not print the namespace column

This commit is contained in:
Clayton Coleman
2017-02-27 22:31:29 -05:00
parent 36a5c0091b
commit fdbdbfe0cf

View File

@@ -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 {
name := sc.Name
if options.WithNamespace {
return fmt.Errorf("storageclass is not namespaced")
}
if storageutil.IsDefaultAnnotation(sc.ObjectMeta) {
name += " (default)"
}