vendor: remove dep and use vndr
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
16f44674a4
commit
148e72d81e
16131 changed files with 73815 additions and 4235138 deletions
9
vendor/k8s.io/client-go/discovery/helper.go
generated
vendored
9
vendor/k8s.io/client-go/discovery/helper.go
generated
vendored
|
@ -23,8 +23,6 @@ import (
|
|||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
apimachineryversion "k8s.io/apimachinery/pkg/version"
|
||||
// Import solely to initialize client auth plugins.
|
||||
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
||||
)
|
||||
|
||||
// MatchesServerVersion queries the server to compares the build version
|
||||
|
@ -49,6 +47,9 @@ func MatchesServerVersion(clientVersion apimachineryversion.Info, client Discove
|
|||
// preference.
|
||||
// - If version is provided and the server does not support it,
|
||||
// return an error.
|
||||
// TODO negotiation should be reserved for cases where we need a version for a given group. In those cases, it should return an ordered list of
|
||||
// server preferences. From that list, a separate function can match from an ordered list of client versions.
|
||||
// This is not what the function has ever done before, but it makes more logical sense.
|
||||
func NegotiateVersion(client DiscoveryInterface, requiredGV *schema.GroupVersion, clientRegisteredGVs []schema.GroupVersion) (*schema.GroupVersion, error) {
|
||||
clientVersions := sets.String{}
|
||||
for _, gv := range clientRegisteredGVs {
|
||||
|
@ -104,8 +105,8 @@ func NegotiateVersion(client DiscoveryInterface, requiredGV *schema.GroupVersion
|
|||
return &clientRegisteredGVs[0], nil
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("failed to negotiate an api version; server supports: %v, client supports: %v",
|
||||
serverVersions, clientVersions)
|
||||
// fall back to an empty GroupVersion. Most client commands no longer respect a GroupVersion anyway
|
||||
return &schema.GroupVersion{}, nil
|
||||
}
|
||||
|
||||
// GroupVersionResources converts APIResourceLists to the GroupVersionResources.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue