Merge pull request #42218 from smarterclayton/incorrect_storageclass_printer

Automatic merge from submit-queue

StorageClass should not print the namespace column

Fixes #40091
This commit is contained in:
Kubernetes Submit Queue 2017-03-02 09:24:30 -08:00 committed by GitHub
commit 8cc7475ce1

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)"
}