mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
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:
@@ -204,7 +204,8 @@ func setConfigDefaults(config *$.Config|raw$) error {
|
||||
config.GroupVersion = ©GroupVersion
|
||||
//}
|
||||
|
||||
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 = ©GroupVersion
|
||||
//}
|
||||
|
||||
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
|
||||
|
||||
@@ -80,7 +80,8 @@ func setConfigDefaults(config *restclient.Config) error {
|
||||
config.GroupVersion = ©GroupVersion
|
||||
//}
|
||||
|
||||
config.Codec = api.Codecs.LegacyCodec(*config.GroupVersion)
|
||||
config.NegotiatedSerializer = api.Codecs
|
||||
|
||||
if config.QPS == 0 {
|
||||
config.QPS = 5
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user