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 for controller #53

Open jayesh-srivastava opened 7 months ago

jayesh-srivastava commented 7 months ago

What this PR does / why we need it: This PR adds support for watchNamespace flag for control-plane-microk8s controller which will restrict the controller to watch cluster-api objects in its namespace only. This is beneficial for certain downstream use cases where there is a separation between controllers and webhooks and one controller is used per namespace.

Which issue(s) this PR fixes: Fixes #50

neoaggelos commented 7 months ago

Thank you @jayesh-srivastava

Please rebase on latest main to resolve the CI issues. Also, please also make sure to sign the CLA.

As for the PR, it looks OK, I imagine we would need a similar PR on https://github.com/canonical/cluster-api-bootstrap-provider-microk8s/