adding retryon support

Signed-off-by: brandoncate <brandon.cate@shipt.com>
This commit is contained in:
brandoncate
2022-04-08 09:58:23 -05:00
parent c68998d75e
commit 48cc7995d7
5 changed files with 102 additions and 1 deletions
+57
View File
@@ -0,0 +1,57 @@
#!/usr/bin/env bash
cat <<EOF | kubectl apply -f -
apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
name: podinfo
namespace: test
spec:
provider: contour
targetRef:
apiVersion: apps/v1
kind: Deployment
name: podinfo
progressDeadlineSeconds: 60
service:
port: 80
targetPort: 9898
retries:
attempts: 3
perTryTimeout: 5s
retryOn: connect-failure,5xx
analysis:
interval: 15s
threshold: 15
maxWeight: 50
stepWeight: 10
metrics:
- name: request-success-rate
threshold: 99
interval: 1m
- name: request-duration
threshold: 500
interval: 1m
webhooks:
- name: acceptance-test
type: pre-rollout
url: http://flagger-loadtester.test/
timeout: 10s
metadata:
type: bash
cmd: "curl -sd 'test' http://podinfo-canary/token | grep token"
- name: contour-acceptance-test
type: pre-rollout
url: http://flagger-loadtester.test/
timeout: 10s
metadata:
type: bash
cmd: "curl -sd 'test' -H 'Host: app.example.com' http://envoy.projectcontour/token | grep token"
- name: load-test
url: http://flagger-loadtester.test/
timeout: 5s
metadata:
type: cmd
cmd: "hey -z 1m -q 5 -c 2 -host app.example.com http://envoy.projectcontour"
logCmdOutput: "true"
EOF