QingCloudAppcenter / QKE

KubeSphere is an open source container application platform by QingCloud based on Kubernetes.
https://www.qingcloud.com/products/kubesphereqke/
29 stars 15 forks source link

设置配置参数中主机 hosts 记录的为3个hosts时,提示不合法 #98

Closed mayuhope closed 5 years ago

mayuhope commented 5 years ago

1、在QKE集群的配置参数中对 主机 hosts 记录 这一字段进行修改,设置hosts为3个,中间使用英文逗号隔开,例如: 192.168.0.11 glusterfs-server1,192.168.0.26 glusterfs-server2,192.168.0.22 glusterfs-server3

2、点击保存,结果提示不合法 image

期望结果: 合法,允许保存

wnxn commented 5 years ago

正则写的不正确,?表示匹配前面的子表达式零次或一次, 表示匹配前面的子表达式任意次。此处应将 ? 改为 修改后:

^((\d{1,3}\.){3}(\d{1,3})\s+(\w|\.|\-)+,)*((\d{1,3}\.){3}(\d{1,3})\s+(\w|\.|\-)+){1}$

修改前: https://github.com/QingCloudAppcenter/QKE/blob/5a0d08e05a3767e38719307511596e19d086dcc1/app/config/config.json#L436-L443

mayuhope commented 5 years ago

已修复