GreatLiu

Results 12 comments of GreatLiu

> Can you tell me the version of your apisix-dashboard? apisix-dashboard 我用的最新的master分支,我看manager-api的源码有做数据结构转换 https://github.com/apache/apisix-dashboard/blob/master/api/internal/core/entity/format.go

apisix-ingress-controller调用的是admin-api,会有上面提到的数据解析问题;manager-api虽然有对upstreamNodes做数据结构转换,响应的json数据controller可以正常的解析,但是controller只支持api-key的验证,而manager-api是jwt的验证

> Did you change your code to v1.4.1 tag? 确定切换到1.4.1 tag了

![image](https://user-images.githubusercontent.com/7006014/183595026-4764e5b5-075d-48db-8d05-65582982306a.png) k8s集群中service对象是不存在的,只存在endpoint对象

通过验证: 1. 使用appNamespaces配置,会出现以上问题 2. 使用namespaceSelector配置,目前正常

发现新的问题:原先通过namespaceSelector关联3个命名空间,一切都很正常,但是去掉其中一个命名空间的watching标签后,apisix-ingress-controller仍然会watching这个去掉标签的命名空间

![image](https://user-images.githubusercontent.com/7006014/184878133-3f5833b7-fec4-4c38-8588-4d0844b48956.png) 加了这一行代码解决问题

> 控制器在启动的时候会list所有apisix对象,截图中仅是部分对象404,那是因为我人工录入了route、upstrem、ssl到集群中,剩下的未录入,原本是想通过手动的方式解决,其他对象我用不上所以没有手填 你们可以看下controller的run方法的逻辑,404也会导致HasSynced返回异常,会导致controller每次执行到这里就退出,然后反反复复 ![image](https://user-images.githubusercontent.com/7006014/185305353-c2888283-4ea3-40ba-ae65-27f9c35a031f.png) 我临时解决办法是:controller从apisix集群list对象,如果返回404,就直接返回空对象和nil,避免run逻辑遇到404而退出 ![image](https://user-images.githubusercontent.com/7006014/185305959-7da811ef-63e5-4bad-9368-a755c6facf00.png)

> default-apisix-cluster-base-url这个配置错了,就不是404的问题了 你们顺着这个调用链路排查下吧,这个链路就没有对错误进行区分,包括404在内,底层抛出来的错误,到上游判断有错误的时候就直接退出了 run --> HasSynced --> syncCacheOnce --> List --> listResource