Skip to content

Commit

Permalink
Added e2e test to check nginx update pass witth nginx validation webh…
Browse files Browse the repository at this point in the history
…ook after canary promotion

Signed-off-by: Iaroslav Vorozhko <iaroslav.vorozhko@mcmakler.de>
  • Loading branch information
Iaroslav Vorozhko committed May 14, 2021
1 parent 41481c1 commit d7999e6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/nginx/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ helm upgrade -i ingress-nginx ingress-nginx/ingress-nginx --version=${NGINX_HELM
--wait \
--namespace ingress-nginx \
--set controller.metrics.enabled=true \
--set controller.admissionWebhooks.enabled=true \
--set controller.podAnnotations."prometheus\.io/scrape"=true \
--set controller.podAnnotations."prometheus\.io/port"=10254 \
--set controller.service.type=NodePort
Expand Down
24 changes: 24 additions & 0 deletions test/nginx/test-canary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,30 @@ done

echo '✔ Canary promotion test passed'

echo 'Testing original ingress update after canary promotion to pass validation webhook'

cat <<EOF | kubectl apply -f -
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: podinfo
namespace: test
labels:
app: podinfo
annotations:
kubernetes.io/ingress.class: "nginx"
spec:
rules:
- host: app.example.com
http:
paths:
- backend:
serviceName: podinfo
servicePort: 80
EOF

echo '✔ Original ingress update with validation webhook passed'

cat <<EOF | kubectl apply -f -
apiVersion: flagger.app/v1beta1
kind: Canary
Expand Down

0 comments on commit d7999e6

Please sign in to comment.