mirror of
https://github.com/fluxcd/flagger.git
synced 2026-08-29 02:37:31 +00:00
bump provider versions in e2e tests
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
This commit is contained in:
+35
-10
@@ -2,7 +2,7 @@
|
||||
|
||||
set -o errexit
|
||||
|
||||
CONTOUR_VER="release-1.20"
|
||||
CONTOUR_VER="v1.21.0"
|
||||
GATEWAY_API_VER="v1alpha2"
|
||||
REPO_ROOT=$(git rev-parse --show-toplevel)
|
||||
KUSTOMIZE_VERSION=4.5.2
|
||||
@@ -14,17 +14,42 @@ fi
|
||||
|
||||
mkdir -p ${REPO_ROOT}/bin
|
||||
|
||||
echo ">>> Installing Gateway API CRDs"
|
||||
kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd?ref=v0.4.1" \
|
||||
| kubectl apply -f -
|
||||
echo ">>> Installing Contour components, Gateway API CRDs"
|
||||
kubectl apply -f https://raw.githubusercontent.com/projectcontour/contour/${CONTOUR_VER}/examples/render/contour-gateway-provisioner.yaml
|
||||
|
||||
echo ">>> Installing Contour components, GatewayClass and Gateway"
|
||||
kubectl apply -f https://raw.githubusercontent.com/projectcontour/contour/${CONTOUR_VER}/examples/render/contour-gateway.yaml
|
||||
|
||||
kubectl -n projectcontour rollout status deployment/contour
|
||||
kubectl -n projectcontour rollout status deployment/contour-gateway-provisioner
|
||||
kubectl -n gateway-api wait --for=condition=complete job/gateway-api-admission
|
||||
kubectl -n gateway-api wait --for=condition=complete job/gateway-api-admission-patch
|
||||
kubectl -n gateway-api rollout status deployment/gateway-api-admission-server
|
||||
kubectl -n projectcontour get all
|
||||
kubectl get gatewayclass -oyaml
|
||||
kubectl -n projectcontour get gateway -oyaml
|
||||
|
||||
echo ">>> Creating GatewayClass"
|
||||
cat <<EOF | kubectl apply -f -
|
||||
kind: GatewayClass
|
||||
apiVersion: gateway.networking.k8s.io/v1alpha2
|
||||
metadata:
|
||||
name: contour
|
||||
spec:
|
||||
controllerName: projectcontour.io/gateway-controller
|
||||
EOF
|
||||
|
||||
echo ">>> Creating Gateway"
|
||||
cat <<EOF | kubectl apply -f -
|
||||
kind: Gateway
|
||||
apiVersion: gateway.networking.k8s.io/v1alpha2
|
||||
metadata:
|
||||
name: contour
|
||||
namespace: projectcontour
|
||||
spec:
|
||||
gatewayClassName: contour
|
||||
listeners:
|
||||
- name: http
|
||||
protocol: HTTP
|
||||
port: 80
|
||||
allowedRoutes:
|
||||
namespaces:
|
||||
from: All
|
||||
EOF
|
||||
|
||||
echo '>>> Installing Kustomize'
|
||||
cd ${REPO_ROOT}/bin && \
|
||||
|
||||
@@ -74,7 +74,7 @@ spec:
|
||||
url: http://flagger-loadtester.test/
|
||||
timeout: 5s
|
||||
metadata:
|
||||
cmd: "hey -z 2m -q 10 -c 2 -host localproject.contour.io -H 'X-Canary: insider' http://envoy.projectcontour/"
|
||||
cmd: "hey -z 2m -q 10 -c 2 -host localproject.contour.io -H 'X-Canary: insider' http://envoy-contour.projectcontour/"
|
||||
logCmdOutput: "true"
|
||||
EOF
|
||||
|
||||
@@ -83,14 +83,14 @@ check_primary "ab-test"
|
||||
display_httproute "ab-test"
|
||||
|
||||
echo '>>> Triggering A/B testing'
|
||||
kubectl -n ab-test set image deployment/podinfo podinfod=stefanprodan/podinfo:3.1.1
|
||||
kubectl -n ab-test set image deployment/podinfo podinfod=stefanprodan/podinfo:6.0.1
|
||||
|
||||
echo '>>> Waiting for A/B testing promotion'
|
||||
retries=50
|
||||
count=0
|
||||
ok=false
|
||||
until ${ok}; do
|
||||
kubectl -n ab-test describe deployment/podinfo-primary | grep '3.1.1' && ok=true || ok=false
|
||||
kubectl -n ab-test describe deployment/podinfo-primary | grep '6.0.1' && ok=true || ok=false
|
||||
sleep 10
|
||||
kubectl -n flagger-system logs deployment/flagger --tail 1
|
||||
count=$(($count + 1))
|
||||
|
||||
@@ -68,14 +68,14 @@ check_primary "bg-test"
|
||||
display_httproute "bg-test"
|
||||
|
||||
echo '>>> Triggering B/G deployment'
|
||||
kubectl -n bg-test set image deployment/podinfo podinfod=stefanprodan/podinfo:3.1.1
|
||||
kubectl -n bg-test set image deployment/podinfo podinfod=stefanprodan/podinfo:6.0.1
|
||||
|
||||
echo '>>> Waiting for B/G promotion'
|
||||
retries=50
|
||||
count=0
|
||||
ok=false
|
||||
until ${ok}; do
|
||||
kubectl -n bg-test describe deployment/podinfo-primary | grep '3.1.1' && ok=true || ok=false
|
||||
kubectl -n bg-test describe deployment/podinfo-primary | grep '6.0.1' && ok=true || ok=false
|
||||
sleep 10
|
||||
kubectl -n flagger-system logs deployment/flagger --tail 1
|
||||
count=$(($count + 1))
|
||||
|
||||
@@ -59,7 +59,7 @@ spec:
|
||||
url: http://flagger-loadtester.test/
|
||||
timeout: 5s
|
||||
metadata:
|
||||
cmd: "hey -z 2m -q 10 -c 2 -host localproject.contour.io http://envoy.projectcontour/"
|
||||
cmd: "hey -z 2m -q 10 -c 2 -host localproject.contour.io http://envoy-contour.projectcontour/"
|
||||
logCmdOutput: "true"
|
||||
EOF
|
||||
|
||||
@@ -68,14 +68,14 @@ check_primary "test"
|
||||
display_httproute "test"
|
||||
|
||||
echo '>>> Triggering canary deployment'
|
||||
kubectl -n test set image deployment/podinfo podinfod=stefanprodan/podinfo:3.1.1
|
||||
kubectl -n test set image deployment/podinfo podinfod=stefanprodan/podinfo:6.0.1
|
||||
|
||||
echo '>>> Waiting for canary promotion'
|
||||
retries=50
|
||||
count=0
|
||||
ok=false
|
||||
until ${ok}; do
|
||||
kubectl -n test describe deployment/podinfo-primary | grep '3.1.1' && ok=true || ok=false
|
||||
kubectl -n test describe deployment/podinfo-primary | grep '6.0.1' && ok=true || ok=false
|
||||
sleep 10
|
||||
kubectl -n flagger-system logs deployment/flagger --tail 1
|
||||
count=$(($count + 1))
|
||||
@@ -152,12 +152,12 @@ spec:
|
||||
url: http://flagger-loadtester.test/
|
||||
timeout: 5s
|
||||
metadata:
|
||||
cmd: "hey -z 2m -q 10 -c 2 -host localproject.contour.io http://envoy.projectcontour/status/500"
|
||||
cmd: "hey -z 2m -q 10 -c 2 -host localproject.contour.io http://envoy-contour.projectcontour/status/500"
|
||||
logCmdOutput: "true"
|
||||
EOF
|
||||
|
||||
echo '>>> Triggering canary deployment rollback test'
|
||||
kubectl -n test set image deployment/podinfo podinfod=stefanprodan/podinfo:3.1.2
|
||||
kubectl -n test set image deployment/podinfo podinfod=stefanprodan/podinfo:6.0.2
|
||||
|
||||
echo '>>> Waiting for canary rollback'
|
||||
retries=50
|
||||
|
||||
Reference in New Issue
Block a user