charts icon indicating copy to clipboard operation
charts copied to clipboard

[Feature] Add nodeSelector to support cluster pods distribution among node group instances

Open samialitop3 opened this issue 2 years ago • 2 comments

When deploying to k8s cluster with a node group that has instances, there should be support for selecting the node group that the cluster pods will be deployed to, to make sure the pods are deployed on the desired instances for HA.

samialitop3 avatar Apr 05 '24 21:04 samialitop3

Can you not achieve this by adding affinity rules to your cluster configuration?

See the CNPG Scheduling documentation.

itay-grudev avatar Apr 08 '24 22:04 itay-grudev

I can use affinity but here is the catch, I have more than one node group, so the cluster will be scheduling to other node groups in case I am doing replacement for the current node group that I want to the database cluster to be working on.

samialitop3 avatar Apr 09 '24 18:04 samialitop3

The cluster.affinity is proxied to ClusterSpec.AffinityConfiguration. There you have the ability to set nodeSelector as well.

itay-grudev avatar May 24 '24 22:05 itay-grudev