Add NegotiatedSerializer to config

This commit is contained in:
Wojciech Tyczynski
2016-04-26 08:28:15 +02:00
parent 43b644ea6f
commit b4c83022e3
21 changed files with 63 additions and 50 deletions

View File

@@ -231,6 +231,9 @@ func SetKubernetesDefaults(config *restclient.Config) error {
// TODO: Unconditionally set the config.Version, until we fix the config.
copyGroupVersion := g.GroupVersion
config.GroupVersion = &copyGroupVersion
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = api.Codecs
}
if config.Codec == nil {
config.Codec = api.Codecs.LegacyCodec(*config.GroupVersion)
}