跳到主要内容
版本:v3&v6

开启多团队

root账号登录服务器,执行以下命令

PW=`kubectl -n ones get onescluster onescluster -o yaml | grep -v { | grep mysqlPassword: | awk '{print $2}'`
USER=`kubectl -n ones get onescluster onescluster -o yaml | grep -v { | grep mysqlUser: | awk '{print $2}'`
HOST=`kubectl -n ones get onescluster onescluster -o yaml | grep -v { | grep mysqlHost: | awk '{print $2}'`
PORT=`kubectl -n ones get onescluster onescluster -o yaml | grep -v { | grep mysqlPort: | awk '{print $2}' | awk -F'"' '{print $2}' `
POD=`kubectl -n ones get pod -l app=ones-tools -oname`
kubectl -n ones exec -it $POD -c ones-tools -- mysql -u$USER -p$PW -h$HOST -P$PORT -e 'update project.organization set visibility = 1;'

验证

登录 ONES 系统,进入 「配置中心」看见「组织配置」则开启多团队成功