forked from argoproj/rollouts-demo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rollout.yaml
68 lines (68 loc) · 1.77 KB
/
rollout.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: istio-rollout
spec:
revisionHistoryLimit: 2
selector:
matchLabels:
app: istio-rollout
template:
metadata:
annotations:
sidecar.istio.io/inject: "true"
labels:
app: istio-rollout
spec:
containers:
- name: istio-rollout
image: argoproj/rollouts-demo:blue
ports:
- name: http
containerPort: 8080
protocol: TCP
resources:
requests:
memory: 32Mi
cpu: 5m
strategy:
canary:
canaryService: istio-rollout-canary
stableService: istio-rollout-stable
# analysis will be performed in background, while rollout is progressing through its steps
analysis:
startingStep: 1 # index of step list, of when to start this analysis
templates:
- templateName: istio-success-rate
args: # arguments allow AnalysisTemplates to be re-used
- name: service
value: canary
- name: namespace
valueFrom:
fieldRef:
fieldPath: metadata.namespace
trafficRouting:
istio:
virtualService:
name: istio-rollout-vsvc
routes:
- primary
steps:
- setWeight: 10
- pause: {} # pause indefinitely
- setWeight: 20
- pause: {duration: 20s}
- setWeight: 30
- pause: {duration: 20s}
- setWeight: 40
- pause: {duration: 20s}
- setWeight: 50
- pause: {duration: 20s}
- setWeight: 60
- pause: {duration: 20s}
- setWeight: 70
- pause: {duration: 20s}
- setWeight: 80
- pause: {duration: 20s}
- setWeight: 90
- pause: {duration: 20s}