流量治理的原理 —— VirutalService —— HTTPMatchRequest
HttpMatchRequest specifies a set of criterion to be met in order for the rule to be applied to the HTTP request. For example, the following restricts the rule to match only requests where the URL path starts with /ratings/v2/ and the request contains a custom end-user
header with value jason
.
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: ratings-route spec: hosts: - ratings.prod.svc.cluster.local http: - match: - headers: end-user: exact: jason uri: prefix: "/ratings/v2/" ignoreUriCase: true route: - destination: host: ratings.prod.svc.cluster.local
HTTPMatchRequest CANNOT be empty. Note:
- If a root VirtualService have matched any property (path, header etc.) by regex, delegate VirtualServices should not have any other matches on the same property.
- If a delegate VirtualService have matched any property (path, header etc.) by regex, root VirtualServices should not have any other matches on the same property.
- HTTPMatchRequest VirutalService 流量 原理 Istiohttpmatchrequest virutalservice流量 原理 routedestination virutalservice流量 原理 virutalservice httpredirect流量 原理 virutalservice httproute流量 原理 virutalservice流量 原理headers virutalservice delegate流量 原理 virutalservice tlsroute流量 原理 virtualservice流量 原理istio 流量istio 流量 时间istio