mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Use the new client.SetKubernetesDefaults methods to properly default config object
This commit is contained in:
parent
80260f4cb9
commit
87970bc356
@ -325,17 +325,9 @@ func (c *clientCache) ClientConfigForVersion(version string) (*client.Config, er
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: remove when SetKubernetesDefaults gets added
|
||||
if len(version) == 0 {
|
||||
version = c.defaultConfig.Version
|
||||
}
|
||||
|
||||
// TODO: have a better config copy method
|
||||
config := *c.defaultConfig
|
||||
|
||||
// TODO: call new client.SetKubernetesDefaults method
|
||||
// instead of doing this
|
||||
config.Version = version
|
||||
client.SetKubernetesDefaults(&config)
|
||||
return &config, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user