canonical / cluster-api-bootstrap-provider-microk8s

This project offers a cluster API bootstrap provider controller that manages the node provision of a MicroK8s cluster.
https://microk8s.io
21 stars 14 forks source link

Support watchNamespace flag for controller #94

Open jayesh-srivastava opened 5 months ago

jayesh-srivastava commented 5 months ago

The current implementation of bootstrap-microk8s controller does not support watchNamespace flag. This won't have any affect on clusters deployed using upstream's deployment model as controllers and webhooks are a singleton instance. But in many cases where controllers and webhooks are separate entities, this can create issues when having a separate controller per namespace as then there will be no restriction for the controller to watch objects in its namespace only. This can create an instance of multiple reconcilers from different namespaces creating resources in different namespaces.

Supporting watchNamespace will be helpful for downstream and will assist in bringing this provider, more in-line with other CAPx providers.