fix client cache for different versions

This commit is contained in:
deads2k 2015-11-10 09:16:23 -05:00
parent 9ae9eb6e85
commit afbcfc7cc6

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
}