kubewatch
kubewatch copied to clipboard
[feature] Support watch any k8s resource
User may want to watch their own crd objects, like advanced-statefulset in openkruise. Current object types is too few.\
Actually, if user config kube-watch controller rbac correcly, we can use k8s.io/client-go/dynamic/dynamicinformer to watch any unstructured object if we know it's gvk info (resources can be found by discovery client)\
By this implementation, pkg/controller/controller.go::Start() function will be more short and clear. We can remove so many if conf.Resource.XXX branch.
Hi @Colvin-Y, can you try this branch and let me know how it works for you?
https://github.com/robusta-dev/kubewatch/pull/76
Hi @Colvin-Y, can you try this branch and let me know how it works for you?
#76 Hi @aantn, Uhuh,nice PR! implementation is same as what I think. I'd like to try it recently, may this weekend.
Btw, why dont'u refactor controller.go to tidy so manyif conf.Resource.XXXcase. \
Yes, I think it it possible. It is quite an eyesore right now.
Now supported in the latest version!