Merge pull request #24789 from wojtek-t/use_proper_codec_in_client

Automatic merge from submit-queue

Use proper codec in client
This commit is contained in:
k8s-merge-robot
2016-05-04 11:00:04 -07:00
41 changed files with 343 additions and 149 deletions

View File

@@ -204,7 +204,8 @@ func setConfigDefaults(config *$.Config|raw$) error {
config.GroupVersion = &copyGroupVersion
//}
config.Codec = $.codecs|raw$.LegacyCodec(*config.GroupVersion)
config.NegotiatedSerializer = $.codecs|raw$
if config.QPS == 0 {
config.QPS = 5
}
@@ -232,11 +233,7 @@ func setConfigDefaults(config *$.Config|raw$) error {
config.GroupVersion = &copyGroupVersion
//}
codec, ok := $.codecs|raw$.SerializerForFileExtension("json")
if !ok {
return $.Errorf|raw$("unable to find serializer for JSON")
}
config.Codec = codec
config.NegotiatedSerializer = $.codecs|raw$
if config.QPS == 0 {
config.QPS = 5

View File

@@ -80,7 +80,8 @@ func setConfigDefaults(config *restclient.Config) error {
config.GroupVersion = &copyGroupVersion
//}
config.Codec = api.Codecs.LegacyCodec(*config.GroupVersion)
config.NegotiatedSerializer = api.Codecs
if config.QPS == 0 {
config.QPS = 5
}