RockteMQ-AI commented on code in PR #200:
URL: https://github.com/apache/rocketmq-operator/pull/200#discussion_r3817785072
##########
pkg/controller/broker/broker_controller.go:
##########
@@ -512,6 +500,30 @@ func (r *ReconcileBroker) getBrokerStatefulSet(broker
*rocketmqv1alpha1.Broker,
}
+func getVolumeMounts(broker *rocketmqv1alpha1.Broker, brokerGroupIndex int,
replicaIndex int) []corev1.VolumeMount {
+ mounts := []corev1.VolumeMount{{
+ MountPath: cons.LogMountPath,
+ Name: broker.Spec.VolumeClaimTemplates[0].Name,
+ SubPath: cons.LogSubPathName + getPathSuffix(broker,
brokerGroupIndex, replicaIndex),
+ }, {
+ MountPath: cons.StoreMountPath,
+ Name: broker.Spec.VolumeClaimTemplates[0].Name,
Review Comment:
The extractVolumeMounts helper is a clean refactoring that makes the volume
mount construction more maintainable. Good approach.
##########
example/rocketmq_v1alpha1_broker_cr.yaml:
##########
@@ -26,6 +26,24 @@ data:
flushDiskType=ASYNC_FLUSH
# set brokerRole to ASYNC_MASTER or SYNC_MASTER. DO NOT set to SLAVE
because the replica instance will automatically be set!!!
brokerRole=ASYNC_MASTER
+ # set aclEnable to true to enable ACL, and set plain_acl.yml to configure
ACL
+ aclEnable=false
+
+ plain_acl.yml: |
+ globalWhiteRemoteAddresses:
+ accounts:
+ - accessKey: RocketMQ
+ secretKey: 12345678
+ whiteRemoteAddress:
Review Comment:
The example plain_acl.yml contains hardcoded credentials (accessKey:
RocketMQ, secretKey: 12345678). While this is acceptable for an example,
consider adding a comment noting these are placeholder values that must be
changed in production.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]