You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/10/27 08:10:10 UTC

[GitHub] [apisix] yangxikun opened a new issue #2536: request help: In istio mesh, apisix proxy request to upstream cann't use istio traffic control

yangxikun opened a new issue #2536:
URL: https://github.com/apache/apisix/issues/2536


   ### Issue description
   
   We deploy apisix in istio mesh, and configure apisix route request to upstream(an k8s service).
   
   The client request example:
   
   ```
   GET /a/b/c HTTP/1.1
   Host: foo.com
   ```
   
   The upstream: http://foo.default.svc:8080.
   
   The `Host: foo.com` will be proxy to foo service backend, but the istio sidecar cann't route these request.
   
   So we modified apisix/init.lua:
   
   ```
   function _M.http_access_phase()
   
       ......
   
       set_upstream_host(api_ctx)
   
       ngx.var.upstream_host = api_ctx.upstream_conf.nodes[1].domain
   end
   ```
   
   Change $upstream_host to configured upstream domain, so that the proxy request host will be foo.default.svc, then istio sidecar can route correctly.
   
   Is there a more elegant way to solve this problem?
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): 1.5
   * OS:
   


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

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



[GitHub] [apisix] yangxikun closed issue #2536: request help: In istio mesh, apisix proxy request to upstream cann't use istio traffic control

Posted by GitBox <gi...@apache.org>.
yangxikun closed issue #2536:
URL: https://github.com/apache/apisix/issues/2536


   


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

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



[GitHub] [apisix] yangxikun commented on issue #2536: request help: In istio mesh, apisix proxy request to upstream cann't use istio traffic control

Posted by GitBox <gi...@apache.org>.
yangxikun commented on issue #2536:
URL: https://github.com/apache/apisix/issues/2536#issuecomment-717093838


   Found a solution: set upstream admin api parameter pass_host=node.


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

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