Commit 7c660bc2 authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #17058 from deads2k/fix-client-cache

Auto commit by PR queue bot
parents b2ede087 afbcfc7c
...@@ -68,6 +68,11 @@ func (c *ClientCache) ClientConfigForVersion(version string) (*client.Config, er ...@@ -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
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment