mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-02 07:35:21 +00:00
Use CodecFactory.WithoutConversion() everywhere
Clarifies that requesting no conversion is part of the codec factory, and future refactors will make the codec factory less opionated about conversion. Kubernetes-commit: 7f9dfe58f4cbe1e1b9e80f52addff70bac87bed4
This commit is contained in:
committed by
Kubernetes Publisher
parent
2e1a3ed22a
commit
3da8d3a9fe
@@ -54,9 +54,7 @@ func NewForConfig(cfg *restclient.Config, mapper PreferredResourceMapper, resolv
|
||||
// so that the RESTClientFor doesn't complain
|
||||
cfg.GroupVersion = &schema.GroupVersion{}
|
||||
|
||||
cfg.NegotiatedSerializer = serializer.DirectCodecFactory{
|
||||
CodecFactory: codecs,
|
||||
}
|
||||
cfg.NegotiatedSerializer = codecs.WithoutConversion()
|
||||
if len(cfg.UserAgent) == 0 {
|
||||
cfg.UserAgent = restclient.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
Reference in New Issue
Block a user