Reputation: 51
I am working on a project that watches resources of all object Kinds within a Namespace and perform an identical action as a response to change of status of said resource. Kind of resources includes CRDs and could be different from one Namespace to another depending on the resources created within a Namespace.
Is there a known pattern for dynamically creating controllers for all object Kinds that exist in a Namespace?
A close example of what i'm looking to achieve is a watcher that watches all resources in a Namespace and send a message to a receiver whenever said resources are changed.
Take this scenario for example, the following actions are taken by this watcher when it is started:
watch-namespace: true
do the following:The watcher must be able to watch all Kinds currently existing in namespace or created in the future. It is also important to note that this watcher does not alter or reconcile the state of the resources it is watching.
Upvotes: 0
Views: 704