You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2020/08/28 10:50:59 UTC
[GitHub] [rocketmq-operator] xiangwangcheng opened a new pull request #42: [ISSUE #38]add nodeAffinity to support scheduling pods to specified nodes
xiangwangcheng opened a new pull request #42:
URL: https://github.com/apache/rocketmq-operator/pull/42
Use NodeAffinity to specify nodes that wanted.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-operator] liuruiyiyang commented on pull request #42: [ISSUE #38]add nodeAffinity to support scheduling pods to specified nodes
Posted by GitBox <gi...@apache.org>.
liuruiyiyang commented on pull request #42:
URL: https://github.com/apache/rocketmq-operator/pull/42#issuecomment-686340490
Hi, @xiangwangcheng. Thanks for your contribution :)
The PR seems has no big problem but one question: does the NameServer need Affinity? If so could you please also add Affinity to NameServer CRD? Thanks.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-operator] liuruiyiyang commented on a change in pull request #42: [ISSUE #38]add nodeAffinity to support scheduling pods to specified nodes
Posted by GitBox <gi...@apache.org>.
liuruiyiyang commented on a change in pull request #42:
URL: https://github.com/apache/rocketmq-operator/pull/42#discussion_r482748427
##########
File path: example/rocketmq_v1alpha1_broker_cr.yaml
##########
@@ -27,6 +27,10 @@ spec:
replicationMode: ASYNC
# replicaPerGroup is the number of each broker cluster
replicaPerGroup: 1
+ # nodeAffinityKey|nodeAffinityKey|nodeAffinityValues used to schedule specified nodes
Review comment:
How should the users write the CR config yaml if they do not need NodeAffinity ?
##########
File path: pkg/controller/broker/broker_controller.go
##########
@@ -380,6 +380,23 @@ func (r *ReconcileBroker) getBrokerStatefulSet(broker *rocketmqv1alpha1.Broker,
statefulSetName = broker.Name + "-" + strconv.Itoa(brokerGroupIndex) + "-replica-" + strconv.Itoa(replicaIndex)
}
+ var affinity corev1.Affinity
+ if broker.Spec.NodeAffinityKey != "" && broker.Spec.NodeAffinityOperator != "" && broker.Spec.NodeAffinityValues != nil {
Review comment:
Have you tried if the user do not config Affinity and what happens when affinity is nil ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org