mariadb-operator/mariadb-operator

[Feature] `Job`, metrics `Pods` and `MaxScale` anti-affinity rules relative to `MariaDB` `Pods`

Closed this issue · 0 comments

Is your feature request related to a problem? Please describe.
When a Job, metrics Pods or MaxScale resources specify affinity.enableAntiaffinity, the anti-affinity rules are not relative to the MariaDB Pods, therefore their Pods can be scheduled in the same Node as MariaDB, which is not an ideal HA setup.

Describe the solution you'd like
Change anti-affinity rules to be relative to MariaDB. This way we would be able to schedule Pods in Nodes where MariaDB is not running.

By default, no anti-affinity rules will be added, so Pods can run alongside MariaDB in the same Node.

If the defaults don't satisfy the user needs, custom (anti-)affinity rules can be added via affinity.podAntiAffinity, affinity.podAffinity and affinity.nodeAffinity.

Describe alternatives you've considered
Leave it as it currently, but it is not really valuable in terms on MariaDB HA.