mirror of https://github.com/fluxcd/flagger.git
Add confirm and pre rollout hooks to e2e tests
This commit is contained in:
parent
691c3c4f36
commit
a39652724d
|
|
@ -45,6 +45,7 @@ metadata:
|
||||||
name: podinfo
|
name: podinfo
|
||||||
namespace: test
|
namespace: test
|
||||||
spec:
|
spec:
|
||||||
|
provider: gloo
|
||||||
targetRef:
|
targetRef:
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
|
|
@ -62,12 +63,22 @@ spec:
|
||||||
threshold: 99
|
threshold: 99
|
||||||
interval: 1m
|
interval: 1m
|
||||||
webhooks:
|
webhooks:
|
||||||
|
- name: "gate"
|
||||||
|
type: confirm-rollout
|
||||||
|
url: http://flagger-loadtester.test/gate/approve
|
||||||
|
- name: acceptance-test
|
||||||
|
type: pre-rollout
|
||||||
|
url: http://flagger-loadtester.test/
|
||||||
|
timeout: 10s
|
||||||
|
metadata:
|
||||||
|
type: bash
|
||||||
|
cmd: "curl -sd 'test' http://podinfo-canary:9898/token | grep token"
|
||||||
- name: load-test
|
- name: load-test
|
||||||
url: http://flagger-loadtester.test/
|
url: http://flagger-loadtester.test/
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
metadata:
|
metadata:
|
||||||
type: cmd
|
type: cmd
|
||||||
cmd: "hey -z 10m -q 10 -c 2 -host app.example.com http://gateway-proxy.gloo-system"
|
cmd: "hey -z 2m -q 5 -c 2 -host app.example.com http://gateway-proxy-v2.gloo-system"
|
||||||
logCmdOutput: "true"
|
logCmdOutput: "true"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
@ -103,7 +114,9 @@ until ${ok}; do
|
||||||
if [[ ${count} -eq ${retries} ]]; then
|
if [[ ${count} -eq ${retries} ]]; then
|
||||||
kubectl -n test describe deployment/podinfo
|
kubectl -n test describe deployment/podinfo
|
||||||
kubectl -n test describe deployment/podinfo-primary
|
kubectl -n test describe deployment/podinfo-primary
|
||||||
|
kubectl -n test logs deployment/flagger-loadtester
|
||||||
kubectl -n gloo-system logs deployment/flagger
|
kubectl -n gloo-system logs deployment/flagger
|
||||||
|
kubectl -n gloo-system get all
|
||||||
kubectl -n gloo-system get virtualservice podinfo -oyaml
|
kubectl -n gloo-system get virtualservice podinfo -oyaml
|
||||||
echo "No more retries left"
|
echo "No more retries left"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,16 @@ spec:
|
||||||
threshold: 500
|
threshold: 500
|
||||||
interval: 30s
|
interval: 30s
|
||||||
webhooks:
|
webhooks:
|
||||||
|
- name: "gate"
|
||||||
|
type: confirm-rollout
|
||||||
|
url: http://flagger-loadtester.test/gate/approve
|
||||||
|
- name: acceptance-test
|
||||||
|
type: pre-rollout
|
||||||
|
url: http://flagger-loadtester.test/
|
||||||
|
timeout: 10s
|
||||||
|
metadata:
|
||||||
|
type: bash
|
||||||
|
cmd: "curl -sd 'test' http://podinfo-canary:9898/token | grep token"
|
||||||
- name: load-test
|
- name: load-test
|
||||||
url: http://flagger-loadtester.test/
|
url: http://flagger-loadtester.test/
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue