-
Notifications
You must be signed in to change notification settings - Fork 1
/
canary.yaml
54 lines (54 loc) · 1.41 KB
/
canary.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
apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
name: mhs
namespace: application
spec:
# deployment reference
targetRef:
apiVersion: apps/v1
kind: Deployment
name: mhs
# the maximum time in seconds for the canary deployment
# to make progress before it is rollback (default 600s)
progressDeadlineSeconds: 600
service:
# service port number
port: 80
# container port number or name (optional)
targetPort: 80
# Istio gateways (optional)
gateways:
- mhs-gateway.application.svc.cluster.local
# Istio virtual service host names (optional)
hosts:
- mhs.example.com
# Istio retry policy (optional)
retries:
attempts: 3
perTryTimeout: 1s
retryOn: "gateway-error,connect-failure,refused-stream"
analysis:
# schedule interval (default 60s)
interval: 1m
# max number of failed metric checks before rollback
threshold: 5
# max traffic percentage routed to canary
# percentage (0-100)
maxWeight: 50
# canary increment step
# percentage (0-100)
stepWeight: 10
metrics:
- name: request-success-rate
# minimum req success rate (non 5xx responses)
# percentage (0-100)
thresholdRange:
min: 99
interval: 30s
- name: request-duration
# maximum req duration P99
# milliseconds
thresholdRange:
max: 500
interval: 30s