bug: When ingress uses cert-manager to issue a certificate, the route and upstream cannot be generated normally #1711
Labels
bug
Something isn't working
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
Current Behavior
Create an ingress and use cert-manager to issue a certificate. At this time, check the log and find that the secret cannot be found, and the ingress cannot be translated correctly.
the error log:
until the secret is created, the ingress is not reprocessed, so the corresponding route and upstream are not created
Expected Behavior
When waiting until the secret is created, the corresponding route and upstream should be created correctly
Error Logs
2023-03-06T16:54:47+08:00 error translation/translator.go:134 failed to translate ingress tls to apisix tls {"error": "secret "echo" not found", "ingress": "&Ingress{ObjectMeta:{echo default ac5cc100-3927-48a9-a7fe-bfa85de5e71f 395422539 1 2023-03-06 16:54:47 +0800 HKT map[] map[cert-manager.io/cluster-issuer:letsencrypt-codefriend-dns kubectl.kubernetes.io/last-applied-configuration:{"apiVersion":"networking.k8s.io/v1","kind":"Ingress","metadata":{"annotations":{"cert-manager.io/cluster-issuer":"letsencrypt-codefriend-dns","kubernetes.io/ingress.class":"nginx","kubernetes.io/tls-acme":"true","nginx.ingress.kubernetes.io/service-weight":"","nginx.ingress.kubernetes.io/ssl-redirect":"true"},"name":"echo","namespace":"default"},"spec":{"rules":[{"host":"echoten.lfszo.codefriend.top","http":{"paths":[{"backend":{"service":{"name":"echo-service","port":{"number":80}}},"path":"/","pathType":"Prefix"}]}}],"tls":[{"hosts":["echoten.lfszo.codefriend.top"],"secretName":"echo"}]}}\n kubernetes.io/ingress.class:nginx kubernetes.io/tls-acme:true nginx.ingress.kubernetes.io/service-weight: nginx.ingress.kubernetes.io/ssl-redirect:true] [] [] [{kubectl-client-side-apply Update networking.k8s.io/v1 2023-03-06 16:54:47 +0800 HKT FieldsV1 {"f:metadata":{"f:annotations":{".":{},"f:cert-manager.io/cluster-issuer":{},"f:kubectl.kubernetes.io/last-applied-configuration":{},"f:kubernetes.io/ingress.class":{},"f:kubernetes.io/tls-acme":{},"f:nginx.ingress.kubernetes.io/service-weight":{},"f:nginx.ingress.kubernetes.io/ssl-redirect":{}}},"f:spec":{"f:rules":{},"f:tls":{}}} }]},Spec:IngressSpec{DefaultBackend:nil,TLS:[]IngressTLS{IngressTLS{Hosts:[echoten.lfszo.codefriend.top],SecretName:echo,},},Rules:[]IngressRule{IngressRule{Host:echoten.lfszo.codefriend.top,IngressRuleValue:IngressRuleValue{HTTP:&HTTPIngressRuleValue{Paths:[]HTTPIngressPath{HTTPIngressPath{Path:/,Backend:IngressBackend{Resource:nil,Service:&IngressServiceBackend{Name:echo-service,Port:ServiceBackendPort{Name:,Number:80,},},},PathType:*Prefix,},},},},},},IngressClassName:nil,},Status:IngressStatus{LoadBalancer:{[]},},}"}
Steps to Reproduce
Environment
apisix-ingress-controller version --long
)kubectl version
)uname -a
)The text was updated successfully, but these errors were encountered: