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 2021/03/18 01:50:26 UTC
[GitHub] [apisix-ingress-controller] tokers edited a comment on issue #289: Support Traffic Split in ApisixRoute
tokers edited a comment on issue #289:
URL: https://github.com/apache/apisix-ingress-controller/issues/289#issuecomment-800900357
> It looks like we only support weight.
> There are some canary feature In [traffic split plugin](https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/traffic-split.md) .
> How about add `match` rules in backends ?
That's really, what about the following configuration snippet:
```yaml
apiVersion: apisix.apache.org/v2alpha1
kind: ApisixRoute
metadata:
name: httpbin-route
spec:
http:
- name: rule1
match:
hosts:
- httpbin.com
paths:
- /ip
backend:
serviceName: httpbin
servicePort: 80
- name: rule2
match:
hosts:
- httpbin.com
paths:
- /status
backends:
- match:
nginxVars:
- subject: http_user_agent
op: RegexMatchCaseInsensitive
value: ".*Mozilla.*"
backend:
serviceName: httpbin
servicePort: 80
weight: 100
- backend: # default backend, always configured it
serviceName: httpbin2
servicePort: 8080
weight: 50
```
----------------------------------------------------------------
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