-
Notifications
You must be signed in to change notification settings - Fork 74
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
Searching for custom resources using SQL failed #709
Comments
If no one's working on it yet, I'm happy to do it :) |
@wujunwei Bro, awesome! The task is yours— and let us know if you need anything! 🚀 |
@elliotxx I found that the searchable objects are generated by 'default-sync-strategy.yaml`. This doesn't prevent the endless addition of objects to this file. Instead, I suggest using the resource version interface of the cluster to get all the CRD in the cluster so it's easier to scale. conf := ctrl.GetConfigOrDie()
dc := discovery.NewDiscoveryClientForConfigOrDie(conf)
resources, _ := dc.ServerPreferredResources()
for _, resource := range resources {
fmt.Println(resource.GroupVersion)
for _, apiResource := range resource.APIResources {
fmt.Println(" "+apiResource.Name)
}
}
//apps/v1
// deployments
// statefulsets
// daemonsets
// controllerrevisions
// replicasets
//events.k8s.io/v1
// events
// ... It is also possible for the user to control which objects Karpor can access by giving specific kubeconfigs |
If I do this, BTW, The effect of |
@wujunwei Sorry, there are many things during the Spring Festival that I didn’t have time to reply. Let’s take a look at this question cc @fanfan-yu |
Hi. |
I got it , but there are still some problems:
h := &internal.EventHandler{EventHandler: handler, Queue: queue, Predicates: predicates}
cache, informer := clientgocache.NewTransformingInformer(lw, &unstructured.Unstructured{}, resyncPeriod, h, trim)
This is indeed a major change not in a hurry to solve it now,just my personal suggestion. And I hope Karpor will become more and more perfect and easy to use. |
@wujunwei Thank you for your attention and feedback! |
Hi. Thank you for your attention and feedback! There are my solutions or suggestions for your problem.
|
What happened?
When I tried to search for an Ingress resource, I got no results.
![image](https://private-user-images.githubusercontent.com/50609931/401845293-3d908355-6d0c-41f2-946a-11d04d29ab16.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyODczNzUsIm5iZiI6MTczOTI4NzA3NSwicGF0aCI6Ii81MDYwOTkzMS80MDE4NDUyOTMtM2Q5MDgzNTUtNmQwYy00MWYyLTk0NmEtMTFkMDRkMjlhYjE2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDE1MTc1NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMyNzI4YmJhMWRkYTUwMWVhM2YxNWE2NzRlOTdhY2Y1YTFjNDgzYmVlZGJiZWM5ZDkwODA4ZGU4ODA4M2RjYTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Mdu3mWVJ6u5Zs5YDtaMMt9DptU4Su8zSe8EwEmATT5E)
However, it exists when searching for a Service resource.
![image](https://private-user-images.githubusercontent.com/50609931/401846224-f239e1d3-a81a-4c47-8c1d-948838253113.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyODczNzUsIm5iZiI6MTczOTI4NzA3NSwicGF0aCI6Ii81MDYwOTkzMS80MDE4NDYyMjQtZjIzOWUxZDMtYTgxYS00YzQ3LThjMWQtOTQ4ODM4MjUzMTEzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDE1MTc1NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWIwYjk1M2ZhYzRkOGVmNDRkYjhiNGIwMWUwMWEyZDM5NmY5ZTc2YjE1NTgyOWQ2MWUzZjAxN2QwMzllYWVkYTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.VDurHng8xwuUgqzlmRLxaePvuV9kO6amdqZOM8iRZpI)
What did you expect to happen?
The search for CR resources such as Ingress succeeds
How can we reproduce it (as minimally and precisely as possible)?
Use helm to deploy normally
Anything else we need to know?
Karpor version
OS version
Install tools
The text was updated successfully, but these errors were encountered: