canonical / cluster-api-control-plane-provider-microk8s

This project offers a cluster API control plane controller that manages the control plane of a MicroK8s cluster. It is expected to be used along with the respective MicroK8s specific machine bootstrap provider.
https://microk8s.io
7 stars 5 forks source link

Support watchNamespace flag for controller #50

Open jayesh-srivastava opened 5 months ago

jayesh-srivastava commented 5 months ago

The current implementation of control-plane-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.

jayesh-srivastava commented 5 months ago

/assign