-
Notifications
You must be signed in to change notification settings - Fork 9
/
canary.yml
58 lines (58 loc) · 1.4 KB
/
canary.yml
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
apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
name: my-app
namespace: my-namespace
spec:
analysis:
alerts:
- name: slack
providerRef:
name: slack-flagger-test
namespace: flagger
severity: info
interval: 1m
iterations: 1
threshold: 2
webhooks:
- metadata:
notification_context: 'Cluster: `dev-cluster`'
script: |
import http from 'k6/http';
import { sleep } from 'k6';
export const options = {
vus: 2,
duration: '30s',
thresholds: {
http_req_duration: ['p(95)<50']
},
ext: {
loadimpact: {
name: 'dev-cluster/my-namespace/my-app',
projectID: ${__ENV.PROJECT_ID},
},
},
};
export default function () {
http.get('http://my-app-canary.my-namespace:80/');
sleep(0.10);
}
slack_channels: flagger-test
upload_to_cloud: "true"
name: k6-load-test
timeout: 5m
type: pre-rollout
url: http://k6-loadtester.flagger:8000/launch-test
autoscalerRef:
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
name: my-app
service:
name: my-app
port: 80
portDiscovery: true
targetPort: 80
targetRef:
apiVersion: apps/v1
kind: Deployment
name: my-app