Quinlan-Z opened a new issue, #1781:
URL: https://github.com/apache/apisix-ingress-controller/issues/1781

   ### Issue description
   
   How to configure adding headers based on separated traffic?
   How to implement the following configuration in apisix ingress?
   
   
   ```
   split_clients "$remote_addr" $helloworld_backend {
       10%   helloworld_grey_server
       *     helloworld_official_server
   }
   
   upstream helloworld_official_server{
       server helloworld_official-svc.applet.svc.cluster.local:11001 
max_fails=3 fail_timeout=10s weight=100;
       server helloworld_official-svc.applet:11001 max_fails=3 fail_timeout=10s 
weight=100;
   }
   
   upstream helloworld_grey_server{
       server helloworld-grey-svc.applet.svc.cluster.local:12001 max_fails=3 
fail_timeout=10s weight=100;
       server helloworld-grey-svc.applet:12001 max_fails=3 fail_timeout=10s 
weight=100;
   }
   
   
   
   location /helloworld/v1/ {
       if ($helloworld_backend ~ "helloworld_grey_server") {
           proxy_set_header grey "yes";
       }
   
       proxy_pass  http://$helloworld_backend/;
   
   }
   ```
   
   ### Environment
   
   - your apisix-ingress-controller version (output of 
apisix-ingress-controller version --long): 1.6.0
   - your Kubernetes cluster version (output of kubectl version): 1.22.0
   - if you run apisix-ingress-controller in Bare-metal environment, also show 
your OS version (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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to