Use the new client.SetKubernetesDefaults methods to properly default config object

This commit is contained in:
Clayton Coleman 2015-01-13 18:50:36 -05:00
parent 80260f4cb9
commit 87970bc356

View File

@ -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
config := *c.defaultConfig
// TODO: call new client.SetKubernetesDefaults method
// instead of doing this
config.Version = version
client.SetKubernetesDefaults(&config)
return &config, nil
}