@@ -31,21 +31,38 @@ jobs:
31
31
--path=./clusters/my-cluster
32
32
- name : Verify cluster reconciliation
33
33
run : |
34
- kubectl -n flux-system wait kustomization/istio-operator --for=condition=ready --timeout=1m
35
- kubectl -n flux-system wait kustomization/istio-system --for=condition=ready --timeout=1m
36
- kubectl -n flux-system wait kustomization/apps --for=condition=ready --timeout=1m
37
- kubectl -n prod wait canary/frontend --for=condition=promoted
38
- kubectl -n prod wait canary/backend --for=condition=promoted
39
- - name : List canaries
34
+ kubectl -n flux-system wait kustomization/istio-operator --for=condition=ready --timeout=2m
35
+ kubectl -n flux-system wait kustomization/istio-system --for=condition=ready --timeout=2m
36
+ kubectl -n flux-system wait kustomization/apps --for=condition=ready --timeout=2m
37
+ kubectl -n prod wait canary/frontend --for=condition=promoted --timeout=1m
38
+ kubectl -n prod rollout status deployment/frontend --timeout=1m
39
+ kubectl -n prod wait canary/backend --for=condition=promoted --timeout=1m
40
+ kubectl -n prod rollout status deployment/backend --timeout=1m
41
+ - name : Test canary release
40
42
run : |
41
- kubectl -n prod get canaries
43
+ kubectl -n prod set image deployment/backend backend=stefanprodan/podinfo:5.0.1
44
+ echo '>>> Waiting for canary finalization'
45
+ retries=25
46
+ count=0
47
+ ok=false
48
+ until ${ok}; do
49
+ kubectl -n prod get canary/backend | grep 'Succeeded' && ok=true || ok=false
50
+ sleep 20
51
+ kubectl -n istio-system logs deployment/flagger --tail 1
52
+ count=$(($count + 1))
53
+ if [[ ${count} -eq ${retries} ]]; then
54
+ echo "No more retries left"
55
+ exit 1
56
+ fi
57
+ done
42
58
- name : Debug failure
43
59
if : failure()
44
60
run : |
45
61
kubectl -n flux-system get all
46
62
kubectl -n flux-system logs deploy/source-controller
47
63
kubectl -n flux-system logs deploy/kustomize-controller
48
64
kubectl -n flux-system logs deploy/helm-controller
65
+ kubectl -n istio-system logs deployment/flagger
49
66
kubectl -n istio-operator get all
50
67
kubectl -n istio-system get all
51
68
kubectl -n prod get all
0 commit comments