CRD and controller scope misunderstanding #3155
-
Hi If i run default kubebuilder init --domain mydomain --repo mydomain/my-controller
kubebuilder create api --group ai --version v1 --kind MyController I get CRD with So if i want to use My plan is correct? The second question is: If i have a lot of namespaces and use my |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The Operator can be cluster or namespace scoped as the CRD
If your operator is cluster scoped then it will be watching the whole cluster However, if you are watching a lot in a big cluster with a lot of things you will probably have performance issues. I hope that answer your question however, feel free to re-open if you need. |
Beta Was this translation helpful? Give feedback.
The Operator can be cluster or namespace scoped as the CRD
That means available for all cluster or just in the namespace
For further information check the doc:
If your operator is cluster scoped then it will be watching the whole cluster
You can filter the cache with https://github.com/kubernetes-sigs/controller-runtime/blob/main/designs/use-selectors-at-cache.md
However, if you are watching a lot in a big cluster with a lot of things you will probably have performance issues.
I hope that answer your question
…