Description:
MySQL Operator can't be used in multi-tenant clusters where different teams/projects may want to use different Operator versions.
Per the documentation (emphasis added):
"The MySQL Operator is deployed in the 'mysql-operator' Kubernetes namespace by default; and watches **all InnoDB Clusters and related resources in the Kubernetes cluster.**"
https://dev.mysql.com/doc/mysql-operator/en/mysql-operator-introduction.html
I propose it should be possible to deploy multiple instances of the Operator, each in their own namespace and watching for InnoDBClusters within that namespace only. The different Operator installations should be able to co-exist within the cluster and not affect each other in any way.
The Operator would then conveniently support multi-tenancy and allow different teams working in one cluster to manage their own Operator installations. It would also become viable to add the Operator as a dependency of Helm charts.
Note that other MySQL K8s operator solutions already support this and generally offer it as the *default* behaviour.
E.g.
https://docs.percona.com/percona-operator-for-mysql/pxc/cluster-wide.html
https://docs.percona.com/percona-operator-for-mysql/ps/cluster-wide.html
How to repeat:
n/a
Suggested fix:
Implement support for an optional installation mode. It should configure the Operator to only watch for InnoDBClusters (and other resources) in the namespace that the Operator is being deployed to.