rocketmq-operator icon indicating copy to clipboard operation
rocketmq-operator copied to clipboard

How to customize the rocketmq-dashboard configuration

Open Euthpic opened this issue 4 years ago • 5 comments

I follow the installation instruction(https://segmentfault.com/a/1190000023862693) to install rocketmq in k8s. Now I want to change rocketmq's default configuration to enable console's password. Operation(https://github.com/apache/rocketmq-externals/blob/master/rocketmq-console/doc/1_0_0/UserGuide_CN.md): `` 1.在Spring配置文件resources/application.properties中修改 开启登录功能

开启登录功能

rocketmq.config.loginRequired=true

Dashboard文件目录,登录用户配置文件所在目录

rocketmq.config.dataPath=/tmp/rocketmq-console/data 2.确保${rocketmq.config.dataPath}定义的目录存在,并且该目录下创建登录配置文件"users.properties", 如果该目录下不存在此文件,则默认使用resources/users.properties文件。 users.properties文件格式为:

该文件支持热修改,即添加和修改用户时,不需要重新启动console

格式, 每行定义一个用户, username=password[,N] #N是可选项,可以为0 (普通用户); 1 (管理员)

#定义管理员 admin=admin,1

#定义普通用户 user1=user1 user2=user2 `` But I dont konw how to find this two files and edit them.Should I inject them by adding configMap?

Euthpic avatar Mar 18 '21 01:03 Euthpic

Env : k8s : Tencent Cloud v1.18.4-tke.6 rocketmq: 4.5.0

Euthpic avatar Mar 18 '21 01:03 Euthpic

@Euthpic resources/application.properties is in source code of rocketmq-dashboard, please check if it can be injected by environment variables. For users.properties, you should create one and put it the folder ${rocketmq.config.dataPath} defined.

However, rocketmq operator does not support mounting a configMap to rocketmq-dashboard, would you like to submit a PR to solve it?

caigy avatar Jul 12 '22 07:07 caigy

@shendong, Can you put forward a pr to support this feature? If you have any question, I will help to fix and implement it!

zongtanghu avatar Sep 29 '22 01:09 zongtanghu

@shendong, Can you put forward a pr to support this feature? If you have any question, I will help to fix and implement it!

Ok,i will fix this issue

shendongsd avatar Sep 29 '22 02:09 shendongsd

Okay, it's yours! @shendongsd

zongtanghu avatar Sep 29 '22 02:09 zongtanghu