How to provide URL rewrite in header route in Argo Rollout durring canary promotion #3087
Unanswered
sanjaydec2015
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am having a demo application called frontend which I am exposing on a subpath /demo using the folowing virtualservice
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: frontend
namespace: argo-demo
spec:
gateways:
hosts:
http:
match:
exact: /demo
rewrite:
uri: /
route:
host: frontend.argo-demo.svc.cluster.local
port:
number: 80
weight: 100
host: frontend-canary.argo-demo.svc.cluster.local
port:
number: 80
weight: 0
Using Argo Rollout I am trying to deploy a new version of frontend application using canary, in the rollout for canary I specify a header match condtion to route traffic to canary version if it matches the header, durring canary promotion, Argo Rollout updates the above virtualserrvice with a new route rule (header-route) for the header match, which is as shown below.
kind: VirtualService
apiVersion: networking.istio.io/v1beta1
metadata:
name: frontend
namespace: argo-demo
spec:
hosts:
- xyz.demo.com
gateways:
- demo-gateway
http:
- name: header-route
match:
- headers:
canary:
exact: canary-tester
route:
- destination:
host: frontend-canary
port:
number: 80
weight: 100
- name: primary
match:
- uri:
exact: /test123
route:
- destination:
host: frontend.argo-demo.svc.cluster.local
port:
number: 80
weight: 100
- destination:
host: frontend-canary.argo-demo.svc.cluster.local
port:
number: 80
rewrite:
uri: /
when argo rollout creates new header match route rule, it does no add the URL rewrite, since the frontedservice expect the request in the root context ie "/", so the calls to the service with the specific header gives a 404 error as the URI rewrite is missing in the header match route rule created by Argo rollout at runtime,
so please advice is there solution to resolve this issue.
Beta Was this translation helpful? Give feedback.
All reactions