mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Add NegotiatedSerializer to config
This commit is contained in:
@@ -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 = ©GroupVersion
|
||||
if config.NegotiatedSerializer == nil {
|
||||
config.NegotiatedSerializer = api.Codecs
|
||||
}
|
||||
if config.Codec == nil {
|
||||
config.Codec = api.Codecs.LegacyCodec(*config.GroupVersion)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user