-
Choerodon平台版本:0.7.0
-
运行环境:自主搭建
-
问题描述:
刚升级到0.7版本。发现新增加了3个预定义角色,但是这三个角色下都没有已权限。
-
执行的操作:
我把原来我自定义的角色给停用掉,再去项目里重新分配一下项目角色,然后,敏捷模块就没权限访问了。
-
报错信息:
麻烦大佬们指导一下,哪里权限需要手动刷一下吗
好吧,已解决,老毛病,还是要手动去swagger,给所有服务发一遍刷权限的请求。
好的。go-register-server
用的是啥版本?需要用0.7.1版本,否则要手动配置正确的REGISTER_SERVRE_NAMESPACE
。可以看下go-register-server
日志,是否发送服务启动消息到消息队列中?
用的是0.7.0
版本。
刚看了下register-service
的deployment文件,发现有多个配置namespace的环境变量,不知道哪个才是正确的,内容如下:
spec:
containers:
- env:
- name: REGISTER_SERVER_NAMESPACE
value: choerodon-devops-prod
- name: KAFKA_ADDRESSES
value: kafka-0.kafka-headless.choerodon-devops-prod.svc.cluster.local:9092,kafka-1.kafka-headless.choerodon-devops-prod.svc.cluster.local:9092,kafka-2.kafka-headless.choerodon-devops-prod.svc.cluster.local:9092
- name: REGISTER_SERVER_NAMESPACE
value: io-choerodon
- name: REGISTER_SERVICE_NAMESPACE
value: choerodon-devops-prod
image: registry.choerodon.com.cn/choerodon-framework/go-register-server:0.7.0
imagePullPolicy: Always
name: register-server
其中,REGISTER_SERVICE_NAMESPACE
这个变量是在0.6版本安装时指定的。而在本次0.6~0.7升级的脚本并未增加环境变量。
在deployment
环境变量中出现了两个REGISTER_SERVER_NAMESPACE
是怎么回事。是不是要把其中一个去掉。我目前的ns的名称是choerodon-devops-prod
。
日志信息如下:
E0702 21:27:44.425356 1 leaderelection.go:228] error initially creating leader election record: namespaces "io-choerodon" not found
E0702 21:27:47.199003 1 leaderelection.go:228] error initially creating leader election record: namespaces "io-choerodon" not found
E0702 21:27:49.780708 1 leaderelection.go:228] error initially creating leader election record: namespaces "io-choerodon" not found
E0702 21:27:52.707700 1 leaderelection.go:228] error initially creating leader election record: namespaces "io-choerodon" not found
E0702 21:27:55.408314 1 leaderelection.go:228] error initially creating leader election record: namespaces "io-choerodon" not found
E0702 21:27:59.739650 1 leaderelection.go:228] error initially creating leader election record: namespaces "io-choerodon" not found
E0702 21:28:03.694897 1 leaderelection.go:228] error initially creating leader election record: namespaces "io-choerodon" not found
E0702 21:28:06.354358 1 leaderelection.go:228] error initially creating leader election record: namespaces "io-choerodon" not found
E0702 21:28:09.545896 1 leaderelection.go:228] error initially creating leader election record: namespaces "io-choerodon" not found
E0702 21:28:13.512351 1 leaderelection.go:228] error initially creating leader election record: namespaces "io-choerodon" not found
E0702 21:28:16.646176 1 leaderelection.go:228] error initially creating leader election record: namespaces "io-choerodon" not found
E0702 21:28:19.545528 1 leaderelection.go:228] error initially creating leader election record: namespaces "io-choerodon" not found
E0702 21:28:22.673991 1 leaderelection.go:228] error initially creating leader election record: namespaces "io-choerodon" not found
E0702 21:28:25.861609 1 leaderelection.go:228] error initially creating leader election record: namespaces "io-choerodon" not found
将版本换成0.7.1吧,REGISTER_SERVER_NAMESPACE
是指此注册服务所在的namespace,0.7.1在chart自动替换为环境变量,不需要手动指定,0.7.0需要手动指定正确的环境变量。换成0.7.1就可以了。
REGISTER_SERVICE_NAMESPACE
指的是注册在这个注册中心的服务所在的namespace,多个可以用逗号分开,变量在README里简单说明
0.7.1
版本你们的仓库并未推送。
[root@vm-48-2-centos ~]# helm update
Command "update" is deprecated, use 'helm repo update'
Hang tight while we grab the latest from your chart repositories...
...Skip local chart repository
...Successfully got an update from the "c7n" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈ Happy Helming!⎈
[root@vm-48-2-centos ~]# helm search go-register-server
NAME CHART VERSION APP VERSION DESCRIPTION
c7n/go-register-server 0.7.0 0.7.0 A Helm chart for Kubernetes
您好 执行 helm update
再试一下