You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "ronething (via GitHub)" <gi...@apache.org> on 2025/07/29 10:07:18 UTC

[I] bug: ApisixRoute `spec.http.backends` associated with ApisixUpstream needs to be handled correctly [apisix-ingress-controller]

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

   ### Current Behavior
   
   Currently, the ApisixRoute resource only processes the `tlsSecret` and `externalNodes` fields of the ApisixUpstream in the `spec.http.upstreams` field. This is incorrect.
   
   https://github.com/apache/apisix-ingress-controller/blob/66c2b0acf14fc13f461e5f262753bdc0598f5d1a/internal/controller/apisixroute_controller.go#L366-L420
   
   After specifying the corresponding serviceName in `spec.http.backends`, if there is an ApisixUpstream with the same name, we should also handle the corresponding `tlsSecret` and `externalNodes` fields.
   
   we can consider obtaining the corresponding ApisixUpstream in the validateBackends function and then processing the relevant logic
   
   https://github.com/apache/apisix-ingress-controller/blob/66c2b0acf14fc13f461e5f262753bdc0598f5d1a/internal/controller/apisixroute_controller.go#L315-L324
   
   ### Expected Behavior
   
   _No response_
   
   ### Error Logs
   
   _No response_
   
   ### Steps to Reproduce
   
   1. Create a Secret and related resources
   
   2. When using the following yaml configuration, it will be found that the corresponding SSL resources cannot be generated
   
   ```yaml
   apiVersion: apisix.apache.org/v2
   kind: ApisixUpstream
   metadata:
     name: quickstart-nginx
   spec:
     ingressClassName: apisix
     scheme: https
     tlsSecret:
       name: test-mtls-secret
       namespace: ingress-apisix
   ---
   apiVersion: apisix.apache.org/v2
   kind: ApisixRoute
   metadata:
     name: nginx
   spec:
     ingressClassName: apisix
     http:
     - name: nginx
       match:
         paths:
         - /hello
       backends:
       - serviceName: quickstart-nginx
         servicePort: 8443
   ```
   
   
   ### Environment
   
   - APISIX Ingress controller version (run `apisix-ingress-controller version --long`): v2.0.0-rc3
   - Kubernetes cluster version (run `kubectl version`): 
   - OS version if running APISIX Ingress controller in a bare-metal environment (run `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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] bug: ApisixRoute `spec.http.backends` associated with ApisixUpstream needs to be handled correctly [apisix-ingress-controller]

Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup closed issue #2496: bug: ApisixRoute `spec.http.backends` associated with ApisixUpstream needs to be handled correctly
URL: https://github.com/apache/apisix-ingress-controller/issues/2496


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org