mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
- move CRD metrics and weight setting to canary analysis - add max weight to CRD spec
43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
# monitor events: watch "kubectl -n test describe rollout/podinfo | sed -n 35,1000p"
|
|
# run tester: kubectl run -n test tester --image=quay.io/stefanprodan/podinfo:1.2.1 -- ./podinfo --port=9898
|
|
# generate latency: watch curl http://podinfo-canary:9898/delay/1
|
|
# generate errors: watch curl http://podinfo-canary:9898/status/500
|
|
# run load test: kubectl run -n test -it --rm --restart=Never hey --image=stefanprodan/loadtest -- sh
|
|
# generate load: hey -z 2m -h2 -m POST -d '{test: 1}' -c 10 -q 5 http://podinfo:9898/api/echo
|
|
apiVersion: apps.weave.works/v1beta1
|
|
kind: Rollout
|
|
metadata:
|
|
annotations:
|
|
apps.weave.works/canary-revision: ""
|
|
apps.weave.works/status: ""
|
|
name: podinfo
|
|
namespace: test
|
|
spec:
|
|
targetKind: Deployment
|
|
virtualService:
|
|
name: podinfo
|
|
primary:
|
|
name: podinfo
|
|
host: podinfo
|
|
canary:
|
|
name: podinfo-canary
|
|
host: podinfo-canary
|
|
canaryAnalysis:
|
|
# max traffic percentage routed to canary
|
|
# percentage (0-100)
|
|
maxWeight: 100
|
|
# canary increment step
|
|
# percentage (0-100)
|
|
stepWeight: 10
|
|
metrics:
|
|
- name: istio_requests_total
|
|
# minimum req success rate (non 5xx responses)
|
|
# percentage (0-100)
|
|
threshold: 99
|
|
interval: 1m
|
|
- name: istio_request_duration_seconds_bucket
|
|
# maximum req duration P99
|
|
# milliseconds
|
|
threshold: 500
|
|
interval: 30s
|