[ISSUE #184 #192] support plain acl configration - #200
Conversation
|
PTAL @caigy |
|
|
||
| } | ||
|
|
||
| func getVolumeMounts(broker *rocketmqv1alpha1.Broker, brokerGroupIndex int, replicaIndex int) []corev1.VolumeMount { |
There was a problem hiding this comment.
It seems a bit complicated. I'd prefer separating ACL related configs from other broker configs, and let user provide the name of configmap/secret of ACL.
There was a problem hiding this comment.
I understand your point, but it seems that there isn’t much difference with this method. If users specify ACL configurations in a separate YAML file, they would still need to maintain common configurations and ACL configurations in two separate files, even though both are for the broker.
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Summary
This PR modifies 3 file(s) with 114 lines of diff. No test changes detected — consider adding test coverage.
Automated review by github-manager-bot
| @@ -52,6 +52,10 @@ const ( | |||
| // BrokerConfigName is the name of mounted configuration file | |||
There was a problem hiding this comment.
No test changes detected alongside source modifications. Consider adding tests to cover the changes.
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Summary
This PR adds plain ACL configuration support to the RocketMQ operator, allowing users to enable ACL by setting aclEnable=true in the broker ConfigMap and providing a plain_acl.yml configuration.
The implementation includes a clean refactoring of VolumeMount construction into a dynamic helper method (extractVolumeMounts), making it easy to conditionally add the ACL config mount.
Overall the change is well-structured. One minor note about the example credentials (see inline comment).
Automated review by "github-manager-bot"
| accounts: | ||
| - accessKey: RocketMQ | ||
| secretKey: 12345678 | ||
| whiteRemoteAddress: |
There was a problem hiding this 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.
| SubPath: cons.LogSubPathName + getPathSuffix(broker, brokerGroupIndex, replicaIndex), | ||
| }, { | ||
| MountPath: cons.StoreMountPath, | ||
| Name: broker.Spec.VolumeClaimTemplates[0].Name, |
There was a problem hiding this comment.
The extractVolumeMounts helper is a clean refactoring that makes the volume mount construction more maintainable. Good approach.
What is the purpose of the change
#192 #184
Brief changelog
Verifying this change