apache / rocketmq-operator

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

[ISSUE #184 #192] expose acl configuration as configMap #231

Open usernameisnull opened 1 month ago

usernameisnull commented 1 month ago

What is the purpose of the change

[ISSUE #184 #192]

Brief changelog

expose acl configuration as configMap

Verifying this change

the brokers cr

apiVersion: rocketmq.apache.org/v1alpha1
kind: Broker
metadata:
  annotations:
    input: '{"cluster":"mabing","namespace":"mcamel-system","name":"test0405","version":"v5.1.4","group_size":1,"replica_per_group":1,"broker_sync_mode":"SYNC_MASTER","root_name":"rocketmq","root_password":"MQ56/8wNi5u43S1VN859dA==","storage_class_name":"local-path","storage_capacity":"1Gi","service_type":1,"ports":[{"name":"nameservice","protocol":"TCP","port":9876,"target_port":9876}],"cpu_request":"0.1","cpu_limit":"1","memory_request":"0.1Gi","memory_limit":"1Gi","conf":"\n#
      brokerClusterName, brokerName, brokerId are automatically generated by the operator
      and do not set it manually!!!\ndeleteWhen=04\nfileReservedTime=48\nflushDiskType=ASYNC_FLUSH\n","name_service_cpu_request":"0.1","name_service_cpu_limit":"1","name_service_memory_request":"0.1Gi","name_service_memory_limit":"1Gi","name_service_replicas":1,"controller_cpu_request":"0.1","controller_cpu_limit":"1","controller_memory_request":"0.1Gi","controller_memory_limit":"1Gi","controller_replicas":1,"controller_storage_class_name":"local-path","controller_storage_capacity":"1Gi","is_open_console":true,"console_service_type":1,"console_cpu_request":"0.1","console_cpu_limit":"1","console_memory_request":"0.1Gi","console_memory_limit":"1Gi","service_monitor_interval":"30s","affinity":{}}'
  creationTimestamp: "2024-05-09T06:18:46Z"
  generation: 4
  name: test0405
  namespace: mcamel-system
  resourceVersion: "97739696"
  uid: 3bd0ee60-f45e-4ad2-b668-6f941d7e11c4
spec:
  affinity: {}
  allowRestart: true
  brokerImage: ghcr.m.daocloud.io/ksmartdata/rocketmq-broker:v5.1.4
  clusterMode: CONTROLLER
  env:
  - name: BROKER_MEM
    value: ' -Xms75m -Xmx768m -Xmn256m '
  hostPath: /data/rocketmq/broker
  imagePullPolicy: IfNotPresent
  replicaPerGroup: 1
  resources:
    limits:
      cpu: "1"
      memory: 1Gi
    requests:
      cpu: 100m
      memory: 107374182400m
  scalePodName: test0405-0-master-0
  size: 1
  storageMode: StorageClass
  volumeClaimTemplates:
  - metadata:
      name: broker-storage
    spec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 1Gi
      storageClassName: local-path
    status: {}
  volumes:
  - configMap:
      items:
      - key: broker-common.conf
        path: broker-common.conf
      name: test0405-broker-cm
    name: broker-config
  - configMap:
      items:
      - key: plain_acl.yml
        path: plain_acl.yml
      name: broker-acl-config
    name: broker-acl-config
status:
  nodes:
  - test0405-0-1-0
  - test0405-0-0-0
  size: 1

the /root/rocketmq/broker/conf/plain_acl.yml in the pod image

Please go through this checklist to help us incorporate your contribution quickly and easily.

Notice: It would be helpful if you could finish the following checklist (the last one is not necessary) before request the community to review your PR.

usernameisnull commented 1 month ago

PTAL @caigy