mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Merge pull request #25894 from brendandburns/thirdparty-watch
Automatic merge from submit-queue Fix third party Fixes https://github.com/kubernetes/kubernetes/issues/25421 Fixes https://github.com/kubernetes/kubernetes/issues/25422 @AdoHe @sjenning @caesarxuchao @lavalamp @kubernetes/sig-api-machinery []()
This commit is contained in:
@@ -373,7 +373,8 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory {
|
||||
gv := gvk.GroupVersion()
|
||||
cfg.GroupVersion = &gv
|
||||
cfg.APIPath = "/apis"
|
||||
cfg.Codec = thirdpartyresourcedata.NewCodec(c.ExtensionsClient.RESTClient.Codec(), gvk.Kind)
|
||||
cfg.Codec = thirdpartyresourcedata.NewCodec(c.ExtensionsClient.RESTClient.Codec(), gvk)
|
||||
cfg.NegotiatedSerializer = thirdpartyresourcedata.NewNegotiatedSerializer(api.Codecs, gvk.Kind, gv, gv)
|
||||
return restclient.RESTClientFor(cfg)
|
||||
}
|
||||
},
|
||||
@@ -398,10 +399,14 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory {
|
||||
return nil, fmt.Errorf("no description has been implemented for %q", mapping.GroupVersionKind.Kind)
|
||||
},
|
||||
Decoder: func(toInternal bool) runtime.Decoder {
|
||||
var decoder runtime.Decoder
|
||||
if toInternal {
|
||||
return api.Codecs.UniversalDecoder()
|
||||
decoder = api.Codecs.UniversalDecoder()
|
||||
} else {
|
||||
decoder = api.Codecs.UniversalDeserializer()
|
||||
}
|
||||
return api.Codecs.UniversalDeserializer()
|
||||
return thirdpartyresourcedata.NewDecoder(decoder, "")
|
||||
|
||||
},
|
||||
JSONEncoder: func() runtime.Encoder {
|
||||
return api.Codecs.LegacyCodec(registered.EnabledVersions()...)
|
||||
|
||||
Reference in New Issue
Block a user