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

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2015-11-19 00:00:32 -08:00
commit 7c660bc240

View File

@ -68,6 +68,11 @@ func (c *ClientCache) ClientConfigForVersion(version string) (*client.Config, er
client.SetKubernetesDefaults(&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
}