mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
massive changes
This commit is contained in:
@@ -290,9 +290,9 @@ func SetKubernetesDefaults(config *Config) error {
|
||||
config.Version = defaultVersionFor(config)
|
||||
}
|
||||
version := config.Version
|
||||
versionInterfaces, err := latest.InterfacesFor(version)
|
||||
versionInterfaces, err := latest.GroupOrDie("").InterfacesFor(version)
|
||||
if err != nil {
|
||||
return fmt.Errorf("API version '%s' is not recognized (valid values: %s)", version, strings.Join(latest.Versions, ", "))
|
||||
return fmt.Errorf("API version '%s' is not recognized (valid values: %s)", version, strings.Join(latest.GroupOrDie("").Versions, ", "))
|
||||
}
|
||||
if config.Codec == nil {
|
||||
config.Codec = versionInterfaces.Codec
|
||||
@@ -543,7 +543,7 @@ func defaultVersionFor(config *Config) string {
|
||||
if version == "" {
|
||||
// Clients default to the preferred code API version
|
||||
// TODO: implement version negotiation (highest version supported by server)
|
||||
version = latest.Version
|
||||
version = latest.GroupOrDie("").Version
|
||||
}
|
||||
return version
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user