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

   ### Current Behavior
   
   When using the tls of the ingress resource, deleting the secret will cause 
the controller to crash.
   
   
![2edd6f1b0b7873f739627d10085d06b](https://user-images.githubusercontent.com/79972061/231030928-effbcf97-f36a-402c-8f76-1b02ae1447e0.png)
   
   crash code:
   
   
https://github.com/apache/apisix-ingress-controller/blob/f9aba3945bef2a385ff8261d42e30599b144023c/pkg/providers/ingress/ingress.go#L579-L586
   
   
   Ingress example:
   ```
   apiVersion: networking.k8s.io/v1
   kind: Ingress
   metadata:
     name: httpbin-ingress-https
   spec:
     ingressClassName: apisix
     tls:
     - hosts:
       - grpc-server
       secretName: grpc-secret
     rules:
     - host: grpc-server
       http:
         paths:
         - path: /
           pathType: Prefix
           backend:
             service:
               name: httpbin
               port:
                 number: 80
   ```
   
   
   
   
   
   
   
   
   
   
   
   ### Expected Behavior
   
   It work.
   
   ### Error Logs
   
   _No response_
   
   ### Steps to Reproduce
   
   1. deploy apisix-ingress-controller
   2. Create a secret `example-secret`
   3. Create ingress and use tls
   ```yaml
   spec:
     tls:
     - hosts:
       - example.com
       secretName: example-secret
   ```
   4. Delete secret `example-secret`
   
   ### Environment
   
   - APISIX Ingress controller version (run `apisix-ingress-controller version 
--long`) 1.6.1
   - Kubernetes cluster version (run `kubectl version`) 1.26.3
   - OS version if running APISIX Ingress controller in a bare-metal 
environment (run `uname -a`) Debian
   


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