mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
let kubectl api-versions use the discovery client
This commit is contained in:
@@ -196,7 +196,7 @@ func (c *Client) SwaggerSchema(groupVersion string) (*swagger.ApiDeclaration, er
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
groupVersions := extractGroupVersions(groupList)
|
||||
groupVersions := ExtractGroupVersions(groupList)
|
||||
// This check also takes care the case that kubectl is newer than the running endpoint
|
||||
if stringDoesntExistIn(groupVersion, groupVersions) {
|
||||
return nil, fmt.Errorf("API version: %s is not supported by the server. Use one of: %v", groupVersion, groupVersions)
|
||||
|
||||
Reference in New Issue
Block a user