We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply ApisixRoute one by one cause dirty configuration step 1:
apiVersion: apisix.apache.org/v2alpha1 kind: ApisixRoute metadata: name: httpbin-route namespace: xxx spec: http: - name: rule1 match: hosts: - httpbin.com paths: - /ip backends: - serviceName: httpbin-service-e2e-test servicePort: 80 weight: 50 - serviceName: httpbin-service-e2e-test-v2 servicePort: 80 weight: 100
The route in APISIX like this:
{"action":"get","node":{"nodes":[{"modifiedIndex":144,"value":{"priority":0,"status":1,"plugins":{"traffic-split":{"rules":[{"weighted_upstreams":[{"weight":100,"upstream_id":"cd3dc953"},{"weight":50}],"match":[{"vars":[["server_port",">",0]]}]}]}},"id":"3fc92fca","create_time":1617946799,"update_time":1617946924,"name":"szydpoc_httpbin-route_rule1","hosts":["httpbin.com"],"uris":["\/ip"],"desc":"szydpoc_httpbin-route_rule1","upstream_id":"d678a7ac"},"createdIndex":142,"key":"\/apisix\/routes\/3fc92fca"}],"key":"\/apisix\/routes","dir":true},"count":"2"}
step 2:
kubectl apply -f - <<EOF apiVersion: apisix.apache.org/v2alpha1 kind: ApisixRoute metadata: name: httpbin-route namespace: xxx spec: http: - name: rule1 priority: 1 match: hosts: - httpbin.com paths: - /ip backend: serviceName: httpbin-service-e2e-test servicePort: 80 - name: rule2 priority: 2 match: hosts: - httpbin.com paths: - /ip exprs: - subject: scope: Cookie name: X-Foo op: Equal value: v2 backend: serviceName: httpbin-service-e2e-test-v2 servicePort: 80 EOF
The route in APISIX like this, the plugin traffic-split should be removed.
traffic-split
{"action":"get","node":{"nodes":[{"modifiedIndex":144,"value":{"priority":0,"status":1,"plugins":{"traffic-split":{"rules":[{"weighted_upstreams":[{"weight":100,"upstream_id":"cd3dc953"},{"weight":50}],"match":[{"vars":[["server_port",">",0]]}]}]}},"id":"3fc92fca","create_time":1617946799,"update_time":1617946924,"name":"xxx_httpbin-route_rule1","hosts":["httpbin.com"],"uris":["\/ip"],"desc":"xxx_httpbin-route_rule1","upstream_id":"d678a7ac"},"createdIndex":142,"key":"\/apisix\/routes\/3fc92fca"}],"key":"\/apisix\/routes","dir":true},"count":"2"}
The text was updated successfully, but these errors were encountered:
The route in step1 doesn't contain traffic-split?
Sorry, something went wrong.
mistake, I will modify the spec of this issue.
This bug is due to we use PATCH when updating, we should use PUT instead.
PATCH
PUT
tokers
Successfully merging a pull request may close this issue.
Issue description
Apply ApisixRoute one by one cause dirty configuration
step 1:
The route in APISIX like this:
step 2:
The route in APISIX like this, the plugin
traffic-split
should be removed.The text was updated successfully, but these errors were encountered: