-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request]all resources can be cached by yurt-hub #162
Comments
@rambohe-ch |
@vincent-pli yeah, the list(resourceToKindMap) will not be used to verify the resource that can be cached or not. |
We use resourceToKindMap is because the obj misses the field of apiverison and kind. The reason why obj misses the field of apiverison and kind is yurthub using serializer.WithoutConversionCodecFactory as NegotiatedSerializer, which produces WithoutVersionDecoder and remove the apiversion/kind of object when serialized from http.resp. Change the NegotiatedSerializer may solve. @qclc (Chen Tao) how about dig more to find a WithVersionCodecFactory as NegotiatedSerializer? @rambohe-ch PTAL. |
@GsssC i think it is a good answer, and i am look forward to your proposal @qclc |
@rambohe-ch yeah,besides,client-go scheme do not support decode cr request,we do need a specially designed nogotiatedSerializer to offer both normal serializer for resource that has been registered in client-go scheme(json protobuf yaml), and serializer(indeed, a json serializer) for unregistered resource like cr. |
I added WithVersionCodecFactory instead of serializer.WithoutConversionCodecFactory. Solved the issue of GVK information loss when decoding built-in resources. |
What would you like to be added:
only resources in the resourceToKindMap can be cached by yurt-hub component, and this a limitation. yurt-hub should cache all kubernetes resources, including crd resource that defined by user.
Why is this needed:
when network between cloud and edge disconnected, if any pod(eg: calico) on the edge node that used some resources(like crd) not in the above map want to run continuously, that is to say, the pod can not restarted successfully because resources(like crd) are not cached by yurt-hub.
The text was updated successfully, but these errors were encountered: