mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
fix client cache for different versions
This commit is contained in:
parent
9ae9eb6e85
commit
afbcfc7cc6
@ -68,6 +68,11 @@ func (c *ClientCache) ClientConfigForVersion(version string) (*client.Config, er
|
|||||||
client.SetKubernetesDefaults(&config)
|
client.SetKubernetesDefaults(&config)
|
||||||
c.configs[version] = &config
|
c.configs[version] = &config
|
||||||
|
|
||||||
|
// `version` does not necessarily equal `config.Version`. However, we know that we call this method again with
|
||||||
|
// `config.Version`, we should get the the config we've just built.
|
||||||
|
configCopy := config
|
||||||
|
c.configs[config.Version] = &configCopy
|
||||||
|
|
||||||
return &config, nil
|
return &config, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user