version:istio: 0.6.0 + Ubuntu 16.04.2 LTS
Hi,
I run bookinfo example in kube by the guide. I did some changes of the example to test the authority of routerule rewrite. But I found it did not work. Can someone give me a hint? Below are what I did:
- I changed the detail request url from 'http://details:9080/details/0' to 'http://ratings:9080/v1/details/0' in productpage service,and restart the service.
- add a rewrite rule(detail-rewrite) of detail to rewrite "/v1/details" to '/details'
- add a redirect rule(rate2detail) of ratings to redirect 'ratings' to 'details'
- refresh the demo page. the demo is ok, it can get the detail info. (redirect success)
- then I replace rate2detail to rate2detail rewrite.
- refresh the demo page and now the the detail request fails. (rewrite not work)
Below are the rules:
detail-rewrite
apiVersion: config.istio.io/v1alpha2
kind: RouteRule
metadata:
name: detail-rewrite
spec:
## Used by services inside the Kubernetes cluster
destination:
name: details
match:
request:
headers:
uri:
prefix: /v1/details
rewrite:
uri: /details
rate2detail
apiVersion: config.istio.io/v1alpha2
kind: RouteRule
metadata:
name: rate2detail
spec:
## Used by services inside the Kubernetes cluster
destination:
name: ratings
redirect:
authority: details:9080
rate2detail rewrite
apiVersion: config.istio.io/v1alpha2
kind: RouteRule
metadata:
name: rate2detail
spec:
## Used by services inside the Kubernetes cluster
destination:
name: ratings
rewrite:
authority: details:9080
version:istio: 0.6.0 + Ubuntu 16.04.2 LTS
Hi,
I run bookinfo example in kube by the guide. I did some changes of the example to test the authority of routerule rewrite. But I found it did not work. Can someone give me a hint? Below are what I did:
Below are the rules:
detail-rewrite
rate2detail
rate2detail rewrite