mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +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
|
// TODO: have a better config copy method
|
||||||
config := *c.defaultConfig
|
config := *c.defaultConfig
|
||||||
|
client.SetKubernetesDefaults(&config)
|
||||||
// TODO: call new client.SetKubernetesDefaults method
|
|
||||||
// instead of doing this
|
|
||||||
config.Version = version
|
|
||||||
return &config, nil
|
return &config, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user