TimVerbois opened a new issue, #1305:
URL: https://github.com/apache/apisix-ingress-controller/issues/1305

   ### Issue description
   
   The logs of my APISIX ingress controller are filled up by errors about 
ingress configurations that are already gone for days:
   
   <img width="1023" alt="Screenshot 2022-08-31 at 06 45 10" 
src="https://user-images.githubusercontent.com/11339705/187594973-888231d5-664c-471a-992d-2171580a1b9b.png";>
   
   The ingress configurations are reported as missing as are the certificates, 
but this is normal, they are really gone.
   
   Is this expected behaviour?
   
   ### Environment
   
   - your apisix-ingress-controller version (output of 
apisix-ingress-controller version --long):
   Version: 1.4.1
   Git SHA: no-git-module
   Go Version: go1.16.15
   Building OS/Arch: linux/amd64
   Running OS/Arch: linux/amd64
   /ingress-apisix # exit
   
   - your Kubernetes cluster version (output of kubectl version):
   Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.5", 
GitCommit:"c285e781331a3785a7f436042c65c5641ce8a9e9", GitTreeState:"clean", 
BuildDate:"2022-03-16T15:58:47Z", GoVersion:"go1.17.8", Compiler:"gc", 
Platform:"darwin/amd64"}
   Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.8", 
GitCommit:"a35ccc8395e8a5eaa83b7b8c981677893b651cba", GitTreeState:"clean", 
BuildDate:"2022-07-28T20:52:46Z", GoVersion:"go1.17.11", Compiler:"gc", 
Platform:"linux/amd64"}
   
   
   
   ### Minimal test code / Steps to reproduce
   
   1. Setup APISIX with ISTIO.
   2. Add application (like hello-kubernetes) to test
   3. Add ingress configuration and make sure it is reachable
   4. Delete the ingress configuration and even the namespace with the 
configuration
   
   ### Actual result
   
   Tons of log lines (every few seconds 4 lines/old ingress).  
   
   ### Error log
   
   2022-08-31T12:41:19+08:00    error   translation/ingress.go:68       failed 
to translate ingress tls to apisix tls   {"error": "secret 
\"hello-kubernetes-certificate\" not found", "ingress": 
"&Ingress{ObjectMeta:{hello-kubernetes  test  
0c72104b-2266-4db1-a4d3-ceba36edf43f 5810030 3 2022-08-29 19:24:04 +0800 HKT 
<nil> <nil> map[] map[cert-manager.io/cluster-issuer:letsencrypt-labo 
kubectl.kubernetes.io/last-applied-configuration:{\"apiVersion\":\"networking.k8s.io/v1\",\"kind\":\"Ingress\",\"metadata\":{\"annotations\":{\"cert-manager.io/cluster-issuer\":\"letsencrypt-labo\",\"kubernetes.io/ingress.class\":\"apisix\"},\"name\":\"hello-kubernetes\",\"namespace\":\"test\"},\"spec\":{\"rules\":[{\"host\":\"hello-kubernetes.example.com\",\"http\":{\"paths\":[{\"backend\":{\"service\":{\"name\":\"hello-kubernetes\",\"port\":{\"number\":80}}},\"path\":\"/\",\"pathType\":\"Prefix\"}]}}],\"tls\":[{\"hosts\":[\"hello-kubernetes.example.com\"],\"secretName\":\"hello-kubernetes-certificate\"}]}}\n
 kubern
 etes.io/ingress.class:apisix] [] []  [{kubectl-create Update 
networking.k8s.io/v1 2022-08-29 19:24:04 +0800 HKT FieldsV1 
{\"f:metadata\":{\"f:annotations\":{\".\":{},\"f:kubernetes.io/ingress.class\":{}}},\"f:spec\":{\"f:rules\":{}}}
 } {kubectl-client-side-apply Update networking.k8s.io/v1 2022-08-29 23:15:11 
+0800 HKT FieldsV1 
{\"f:metadata\":{\"f:annotations\":{\"f:cert-manager.io/cluster-issuer\":{},\"f:kubectl.kubernetes.io/last-applied-configuration\":{}}},\"f:spec\":{\"f:tls\":{}}}
 
}]},Spec:IngressSpec{DefaultBackend:nil,TLS:[]IngressTLS{IngressTLS{Hosts:[hello-kubernetes.example.com],SecretName:hello-kubernetes-certificate,},},Rules:[]IngressRule{IngressRule{Host:hello-kubernetes.example.com,IngressRuleValue:IngressRuleValue{HTTP:&HTTPIngressRuleValue{Paths:[]HTTPIngressPath{HTTPIngressPath{Path:/,Backend:IngressBackend{Resource:nil,Service:&IngressServiceBackend{Name:hello-kubernetes,Port:ServiceBackendPort{Name:,Number:80,},},},PathType:*Prefix,},},},},},},IngressClassName:
 nil,},Status:IngressStatus{LoadBalancer:{[]},},}"}
   2022-08-31T12:41:19+08:00    error   ingress/ingress.go:131  failed to 
translate ingress     {"error": "secret \"hello-kubernetes-certificate\" not 
found", "ingress": {}}
   2022-08-31T12:41:19+08:00    warn    ingress/ingress.go:233  sync ingress 
failed, will retry {"object": 
{"Type":3,"Object":{"Key":"test/hello-kubernetes","GroupVersion":"networking/v1","OldObject":null},"Tombstone":{}},
 "error": "secret \"hello-kubernetes-certificate\" not found"}
   2022-08-31T12:41:19+08:00    error   ingress/ingress.go:248  failed to list 
ingress resource {"error": "ingress.networking.k8s.io \"hello-kubernetes\" not 
found"}
   
   ### Expected result
   
   Once the ingress is removed from the cluster configuration, there should not 
be any log files about it, since they are gone.


-- 
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]

Reply via email to