apache / rocketmq-operator

Apache RocketMQ Operator
https://rocketmq.apache.org/
Apache License 2.0
314 stars 127 forks source link

Sometimes we need nodeAffinity/podAffinity feature to determine which nodes the pods are scheduled. #38

Closed xiangwangcheng closed 2 years ago

xiangwangcheng commented 4 years ago

FEATURE REQUEST

  1. Please describe the feature you are requesting. Sometimes, users may have the requirement that the broker pods being scheduled to particular nodes. So it'd be better to support the affinity feature.

  2. Provide any additional detail on your proposed use case for this feature. for example, we have 3 nodes which are node1,node2,node3, and we want to constrain the pods of the broker to node1 and node2.

  3. Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue? Nice to have.

  4. If there are some sub-tasks using -[] for each subtask and create a corresponding issue to map to the sub task:

xiangwangcheng commented 4 years ago

We achieved this by using NodeAffinity which selects particular nodes according to the node's labels. I can contribute the code if this feature worth to.

liuruiyiyang commented 4 years ago

Hi @xiangwangcheng, it is welcomed to submit a PR and contribute your code, we can discuss it together.

0x032c commented 2 years ago

Is this issue fixed?
how to use podAffinity

caigy commented 2 years ago

Is this issue fixed? how to use podAffinity

@se7vet Please check out the latest code, affinity can be configured. You can find more details in crds of nameservice and broker.