shareinto opened a new issue, #1393:
URL: https://github.com/apache/apisix-ingress-controller/issues/1393
### Issue description
When the tls of the ingress is translated, it needs to obtain the secret
from the lister, but the informer may not be completed synchronously at this
time, so the acquisition of the secret fails.
What I can be sure of is that the secret does exist
```
k -n wshop-cocked92 get secret wshop-wildcard
──(Tue,Oct18)─┘
NAME TYPE DATA AGE
wshop-wildcard kubernetes.io/tls 2 454d
```
error log
```
2022-10-18T05:50:54-04:00 error translation/translator.go:384
failed to translate ingress tls to apisix tls {"error": "secret
\"mshop-wildcard\" not found", "ingress": "&Ingress{ObjectMeta:{inner-ingress
wshop-cocked92
/apis/extensions/v1beta1/namespaces/wshop-cocked92/ingresses/inner-ingress
3e06dc73-586c-48df-a28a-57ad8ca37727 546777417 6 2021-07-20 10:54:13 -0400 EDT
..."}
```
https://github.com/apache/apisix-ingress-controller/blob/5f2c39815f483b30f4ae3305556564244563a589/pkg/providers/apisix/translation/apisix_ssl.go#L70
### Environment
- your apisix-ingress-controller version (output of
apisix-ingress-controller version --long):
Version: 1.5.0
Git SHA:
https://github.com/apache/apisix-ingress-controller/commit/f23454fa30e92a4e4392a8c5b2b0ffd2d3bf80b4
Go Version: go1.19.2
Building OS/Arch: linux/amd64
Running OS/Arch: linux/amd64
- your Kubernetes cluster version (output of kubectl version):
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.6",
GitCommit:"ad3338546da947756e8a88aa6822e9c11e7eac22", GitTreeState:"clean",
BuildDate:"2022-04-14T08:49:13Z", GoVersion:"go1.17.9", Compiler:"gc",
Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19+",
GitVersion:"v1.19.16-eks-a05fdea",
GitCommit:"a05fdea9a04815782f9c4b08eed73bb2d78b07e3", GitTreeState:"clean",
BuildDate:"2022-06-09T21:50:47Z", GoVersion:"go1.15.15", Compiler:"gc",
Platform:"linux/amd64"}
WARNING: version difference between client (1.23) and server (1.19) exceeds
the supported minor version skew of +/-1
- if you run apisix-ingress-controller in Bare-metal environment, also show
your OS version (uname -a):
### Minimal test code / Steps to reproduce
1. create a lot of secrets
2. create a ingress with tls
### Actual result
ingress translate failed
### Error log
```
2022-10-18T05:50:54-04:00 error translation/translator.go:384
failed to translate ingress tls to apisix tls {"error": "secret
\"mshop-wildcard\" not found", "ingress": "&Ingress{ObjectMeta:{inner-ingress
wshop-cocked92
/apis/extensions/v1beta1/namespaces/wshop-cocked92/ingresses/inner-ingress
3e06dc73-586c-48df-a28a-57ad8ca37727 546777417 6 2021-07-20 10:54:13 -0400 EDT
<nil> <nil> map[]
map[field.cattle.io/publicEndpoints:[{\"addresses\":[\"\"],\"port\":443,\"protocol\":\"HTTPS\",\"serviceName\":\"wshop-cocked92:mshop-svc\",\"ingressName\":\"wshop-cocked92:inner-ingress\",\"hostname\":\"cocked92.hotishop.com\",\"path\":\"/\",\"allNodes\":false}]
kubernetes.io/ingress.class:nginx
nginx.ingress.kubernetes.io/proxy-body-size:20M
nginx.ingress.kubernetes.io/ssl-redirect:true] [] []
[]},Spec:IngressSpec{Backend:nil,TLS:[]IngressTLS{IngressTLS{Hosts:[cocked92.hotishop.com],SecretName:mshop-wildcard,},},Rules:[]IngressRule{IngressRule{Host:cocked92.hotishop.com,IngressRuleV
alue:IngressRuleValue{HTTP:&HTTPIngressRuleValue{Paths:[]HTTPIngressPath{HTTPIngressPath{Path:/,Backend:IngressBackend{ServiceName:mshop-svc,ServicePort:{0
80
},Resource:nil,},PathType:*ImplementationSpecific,},},},},},},IngressClassName:nil,},Status:IngressStatus{LoadBalancer:{[{
a848a324cb9474bfbbd0c32d417d4de3-562776765955e017.elb.us-east-2.amazonaws.com
[]}]},},}"}
```
### Expected result
ingress translate successfully
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]