update vendor

Signed-off-by: Roland.Ma <rolandma@yunify.com>
This commit is contained in:
Roland.Ma
2021-08-11 07:10:14 +00:00
parent a18f72b565
commit ea8f47c73a
2901 changed files with 269317 additions and 43103 deletions

View File

@@ -58,7 +58,7 @@ func NewDiscoveryCategoryExpander(client discovery.DiscoveryInterface) CategoryE
// Expand fulfills CategoryExpander
func (e discoveryCategoryExpander) Expand(category string) ([]schema.GroupResource, bool) {
// Get all supported resources for groups and versions from server, if no resource found, fallback anyway.
apiResourceLists, _ := e.discoveryClient.ServerResources()
_, apiResourceLists, _ := e.discoveryClient.ServerGroupsAndResources()
if len(apiResourceLists) == 0 {
return nil, false
}

View File

@@ -26,7 +26,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/discovery"
"k8s.io/klog"
"k8s.io/klog/v2"
)
// APIGroupResources is an API group with a mapping of versions to

View File

@@ -19,7 +19,7 @@ package restmapper
import (
"strings"
"k8s.io/klog"
"k8s.io/klog/v2"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -84,7 +84,7 @@ func (e shortcutExpander) getShortcutMappings() ([]*metav1.APIResourceList, []re
res := []resourceShortcuts{}
// get server resources
// This can return an error *and* the results it was able to find. We don't need to fail on the error.
apiResList, err := e.discoveryClient.ServerResources()
_, apiResList, err := e.discoveryClient.ServerGroupsAndResources()
if err != nil {
klog.V(1).Infof("Error loading discovery information: %v", err)
}