Bug #116457 Support multiple mysql-operator instances, each watching a unique K8s namespace
Submitted: 23 Oct 2024 9:19 Modified: 23 Oct 2024 9:53
Reporter: James Walker Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Operator Severity:S4 (Feature request)
Version:9.1.0 OS:Any
Assigned to: CPU Architecture:Any

[23 Oct 2024 9:19] James Walker
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.
[23 Oct 2024 9:20] James Walker
Clarify title
[23 Oct 2024 9:53] MySQL Verification Team
Hello James Walker,

Thank you for the feature request.

regards,
Umesh