pioneer-hash opened a new issue #403:
URL: https://github.com/apache/apisix-ingress-controller/issues/403
### Issue description
ingress-controller cannot discover services outside the default namespace
This is my upstream.yam configuration
``` yaml
apiVersion: apisix.apache.org/v1
kind: ApisixUpstream
metadata:
name: web2
namespace: gray-ns
spec:
loadbalancer:
type: chash
hashOn: header
key: "user-agent"
```
This is my env info
```
[root@host-172-21-9-35 CRD]# kubectl get service -n gray-ns
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
web2 NodePort 10.97.252.18 <none> 81:31261/TCP 95m
web3 NodePort 10.107.130.219 <none> 81:31877/TCP 64m
```
This is error log
···
2021-04-23T10:33:14+08:00 warn controller/apisix_upstream.go:182
sync ApisixUpstream failed, will retry {"object":
{"Type":3,"Object":"default/web2","Tombstone":{"metadata":{"name":"web2","namespace":"default","selfLink":"/apis/apisix.apache.org/v1/namespaces/default/apisixupstreams/web2","uid":"e1fd33bf-5b04-4460-b9b6-dfb2db6183b3","resourceVersion":"38021690","generation":1,"creationTimestamp":"2021-04-23T02:31:51Z","annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"apisix.apache.org/v1\",\"kind\":\"ApisixUpstream\",\"metadata\":{\"annotations\":{},\"name\":\"web2\",\"namespace\":\"default\"},\"spec\":{\"loadbalancer\":{\"hashOn\":\"header\",\"key\":\"user-agent\",\"type\":\"chash\"}}}\n"}},"spec":{"loadbalancer":{"type":"chash","hashOn":"header","key":"user-agent"}}}},
"error": "service \"web2\" not found"}
···
### Environment
* your apisix-ingress-controller version (output of
`apisix-ingress-controller version --long`);
* your Kubernetes cluster version (output of `kubectl version`);
* if you run apisix-ingress-controller in Bare-metal environment, also show
your OS version (`uname -a`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]