kubectl stops rendering List as suffix kind name for CRD resources

This commit is contained in:
Di Xu
2018-04-13 10:46:38 +08:00
parent 44ede98e94
commit 82cc3b5d59
2 changed files with 13 additions and 2 deletions

View File

@@ -18,7 +18,6 @@ package validation
import (
"errors"
"strings"
"k8s.io/apimachinery/pkg/runtime/schema"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
@@ -54,7 +53,7 @@ func (v *SchemaValidation) ValidateBytes(data []byte) error {
return utilerrors.NewAggregate(errs)
}
if strings.HasSuffix(gvk.Kind, "List") {
if (gvk == schema.GroupVersionKind{Version: "v1", Kind: "List"}) {
return utilerrors.NewAggregate(v.validateList(obj))
}