-
Notifications
You must be signed in to change notification settings - Fork 401
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
[Question] Does yurthub support to local proxy for customresourcedefinitions (CRDs) ? #2121
Comments
@obitoquilt Thank you for raising the issue. I have verified the request I think the reason of this issue is that you have not configured the cache-agents field of yurthub. |
Thanks for your reply. the crds also have been cached on my local disk, but when i disconnect network on edge node (it cannot connect to api-server), re-request for |
@obitoquilt On my environment, crds can be listed when network offline. would you like to show me the details of crds(like crds filepath, etc.) caches on your local disk? |
the content of {"apiVersion": "apiextensions.k8s.io/v1", "kind": "PartialObjectMetadata", "metadata": {"creationTimestamp": ""}} BTW, the version used is v1.4.0 |
@obitoquilt would you like to upload the details logs of yurthub component on this node? I think maybe we can find some clues in the logs. |
Yes. Here are the error logs of Yurthub.
I read the related source code briefly in func NewDefaultRESTMapperFromScheme() *meta.DefaultRESTMapper {
s := scheme.Scheme
defaultGroupVersions := s.PrioritizedVersionsAllGroups()
mapper := meta.NewDefaultRESTMapper(defaultGroupVersions)
// enumerate all supported versions, get the kinds, and register with the mapper how to address
// our resources.
for _, gv := range defaultGroupVersions {
for kind := range s.KnownTypes(gv) {
// Only need to process non-list resources
if !strings.HasSuffix(kind, "List") {
// Since RESTMapper is only used for mapping GVR to GVK information,
// the scope field is not involved in actual use,
// so all scope are currently set to meta.RESTScopeNamespace
scope := meta.RESTScopeNamespace
mapper.Add(gv.WithKind(kind), scope)
}
}
}
return mapper
} Thanks for your kind help! |
@obitoquilt When yurthub cache response for
The so when would you upload the contents of configmap |
@rambohe-ch Here are the configmap data:
cache_agents: '*'
discardcloudservice: ""
masterservice: ""
servicetopology: "" |
Thanks for your detailed reply. I check the file
The cilium-agent requests The normal content of {
"apiextensions.k8s.io/v1/customresourcedefinition": "CustomResourceDefinition",
"apiextensions.k8s.io/v1/customresourcedefinitions": "CustomResourceDefinition" How to solve this error where request with |
@obitoquilt I have checked In the following
but this request is actually a
I will make a pull request to handle this bug, please stay tuned. |
@obitoquilt I want to describe some points about the solution of this bug, any comments are welcome.
|
Looks good to me! |
/assign @rambohe-ch |
What happened:
request for
/apis/apiextensions.k8s.io/v1/customresourcedefinitions?limit=500
in offline env, but gotcustomresourcedefinitions.apiextensions.k8s.io "" not found
errorWhat you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
kubectl version
): v1.27.4cat /etc/os-release
): centos linuxuname -a
): 5.15.13-1.el7.elrepo.x86_64others
/kind question
The text was updated successfully, but these errors were encountered: