From 6bba84422d164228e90a258d4a82e421144f5c33 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Sun, 6 Oct 2019 10:44:42 +0300 Subject: [PATCH] Add service target port to Kubernetes e2e tests --- test/e2e-kubernetes-tests.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/e2e-kubernetes-tests.sh b/test/e2e-kubernetes-tests.sh index 1af7f2af..0bd38e21 100755 --- a/test/e2e-kubernetes-tests.sh +++ b/test/e2e-kubernetes-tests.sh @@ -32,7 +32,8 @@ spec: name: podinfo progressDeadlineSeconds: 60 service: - port: 9898 + port: 80 + targetPort: 9898 portDiscovery: true canaryAnalysis: interval: 15s @@ -55,13 +56,13 @@ spec: timeout: 10s metadata: type: bash - cmd: "curl -sd 'test' http://podinfo-canary:9898/token | grep token" + cmd: "curl -sd 'test' http://podinfo-canary/token | grep token" - name: load-test url: http://flagger-loadtester.test/ timeout: 5s metadata: type: cmd - cmd: "hey -z 10m -q 10 -c 2 http://podinfo-canary.test:9898/" + cmd: "hey -z 10m -q 10 -c 2 http://podinfo-canary.test/" logCmdOutput: "true" EOF @@ -83,14 +84,14 @@ done echo '✔ Canary initialization test passed' echo '>>> Triggering canary deployment' -kubectl -n test set image deployment/podinfo podinfod=quay.io/stefanprodan/podinfo:1.7.0 +kubectl -n test set image deployment/podinfo podinfod=stefanprodan/podinfo:3.1.1 echo '>>> Waiting for canary promotion' retries=50 count=0 ok=false until ${ok}; do - kubectl -n test describe deployment/podinfo-primary | grep '1.7.0' && ok=true || ok=false + kubectl -n test describe deployment/podinfo-primary | grep '3.1.1' && ok=true || ok=false sleep 10 kubectl -n flagger-system logs deployment/flagger --tail 1 count=$(($count + 1))