chore: add kustomize. fix: e2e test

Signed-off-by: Gallardot <tttick@163.com>
This commit is contained in:
Gallardot 2022-11-23 11:22:06 +08:00 committed by Sanskar Jaiswal
parent e440be17ae
commit 69861e0c8a
5 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,7 @@
bases:
- ../base/flagger/
- ../base/prometheus/
resources:
- namespace.yaml
patchesStrategicMerge:
- patch.yaml

View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: flagger-system

View File

@ -0,0 +1,14 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: flagger
spec:
template:
spec:
containers:
- name: flagger
args:
- -log-level=info
- -include-label-prefix=app.kubernetes.io
- -mesh-provider=apisix
- -metrics-server=http://flagger-prometheus:9090

View File

@ -229,6 +229,18 @@ rules:
- update
- patch
- delete
- apiGroups:
- apisix.apache.org
resources:
- apisixroutes
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- nonResourceURLs:
- /version
verbs:

View File

@ -143,4 +143,19 @@ until ${ok}; do
fi
done
echo '>>> Waiting for canary finalization'
retries=50
count=0
ok=false
until ${ok}; do
kubectl -n test get canary/podinfo | grep 'Succeeded' && ok=true || ok=false
sleep 5
count=$(($count + 1))
if [[ ${count} -eq ${retries} ]]; then
kubectl -n apisix logs deployment/flagger
echo "No more retries left"
exit 1
fi
done
echo '✔ Canary promotion test passed'