-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to custom plain_acl.yml content? #184
Labels
enhancement
New feature or request
Comments
It seems like the broker CRD does not support mounting the ACL configuration files directly. |
@chixianliangGithub Pls try if the following works:
|
|
我是这样开启 ACL 的
apiVersion: v1
kind: ConfigMap
metadata:
name: broker-config
data:
# BROKER_MEM sets the broker JVM, if set to "" then Xms = Xmx = max(min(1/2 ram, 1024MB), min(1/4 ram, 8GB))
BROKER_MEM: " -Xms2g -Xmx2g -Xmn1g "
broker-common.conf: |
# brokerClusterName, brokerName, brokerId are automatically generated by the operator and do not set it manually!!!
deleteWhen=04
fileReservedTime=48
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
aclEnable = true
plain_acl.yml: |-
globalWhiteRemoteAddresses:
- 10.10.*.*
- 10.11.*.*
- 10.16.13.*
accounts:
- accessKey: xxxxxxxxxxxx
secretKey: xxxxxxxxxxxx
whiteRemoteAddress:
admin: false
defaultTopicPerm: PUB|SUB
defaultGroupPerm: PUB|SUB
topicPerms:
- topicA=DENY
- topicB=PUB|SUB
- topicC=SUB
groupPerms:
# the group should convert to retry topic
- groupA=DENY
- groupB=PUB|SUB
- groupC=SUB
- accessKey: xxxxxxxxxxxx
secretKey: xxxxxxxxxxxx
whiteRemoteAddress:
# if it is admin, it could access all resources
admin: true
spec:
volumes:
...
- name: broker-acl
configMap:
name: broker-config
items:
- key: plain_acl.yml
path: plain_acl.yml
defaultMode: 420
...
volumeMounts:
...
- name: broker-acl
mountPath: /root/rocketmq/broker/conf/plain_acl.yml
subPath: plain_acl.yml
./mqadmin getAccessConfigSubCommand -n 10.210.95.195:9876 -c broker |
你这路子有点野啊,不是应该在kind: broker里面定义volumeMounts吗 |
drivebyer
added a commit
to drivebyer/rocketmq-operator
that referenced
this issue
Dec 6, 2023
drivebyer
added a commit
to drivebyer/rocketmq-operator
that referenced
this issue
Mar 13, 2024
应该把configmap里的plain_acl.yml替换到/home/rocketmq/rocketmq-4.9.7/conf/plain_acl.yml才是正确的 |
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in broker-config,i add aclEnable=true.
I want to cutsom plain_acl.yml
The text was updated successfully, but these errors were encountered: