-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathfocused_Canary_Testing.yaml
53 lines (53 loc) · 1.25 KB
/
focused_Canary_Testing.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: flaskvirtualservice
spec:
hosts:
- "flask.example.com" # destination hosts to which traffic is being sent. The hosts field applies to both HTTP and TCP services
gateways:
- flask-gateway
http:
- match:
- uri:
prefix: /list
- uri:
prefix: /home
route:
- destination:
host: flaskfrontend.default.svc.cluster.local
subset: v1
port:
number: 5000
weight: 90
- destination:
host: flaskfrontend.default.svc.cluster.local
subset: v2 # default to pods of the flaskfrontend service with label “version: v1” (i.e., subset v1)
port:
number: 5000
weight: 10
- match:
- headers:
canary:
exact: "canary"
route:
- destination:
host: flaskfrontend.default.svc.cluster.local
subset: v2
port:
number: 5000
weight: 100
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: flaskdestinationrule
spec:
host: flaskfrontend.default.svc.cluster.local
subsets:
- name: v1
labels:
version: v1 # this is latest tag in our image
- name: v2
labels:
version: v2