Skip to content

Commit e116b38

Browse files
committed
add e2e tests
Signed-off-by: Sanskar Jaiswal <[email protected]>
1 parent badabfe commit e116b38

6 files changed

Lines changed: 394 additions & 0 deletions

File tree

.github/workflows/e2e.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
- gloo
3232
- skipper
3333
- kubernetes
34+
- gatewayapi
3435
steps:
3536
- name: Checkout
3637
uses: actions/checkout@v2

test/gatewayapi/install.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env bash
2+
3+
set -o errexit
4+
5+
CONTOUR_VER="release-1.20"
6+
GATEWAY_API_VER="v1alpha2"
7+
REPO_ROOT=$(git rev-parse --show-toplevel)
8+
KUSTOMIZE_VERSION=4.5.2
9+
OS=$(uname -s)
10+
ARCH=$(arch)
11+
12+
mkdir -p ${REPO_ROOT}/bin
13+
14+
echo ">>> Installing Contour ${CONTOUR_VER}, Gateway API components ${GATEWAY_API_VER}"
15+
cd ${REPO_ROOT}/bin && \
16+
kubectl apply -f https://raw.githubusercontent.com/projectcontour/contour/${CONTOUR_VER}/examples/render/contour-gateway.yaml
17+
18+
kubectl -n projectcontour rollout status deployment/contour
19+
kubectl -n projectcontour get all
20+
21+
echo '>>> Installing Kustomize'
22+
cd ${REPO_ROOT}/bin && kustomize_url=https://github.com/kubernetes-sigs/kustomize/releases/download && \
23+
curl -sL ${kustomize_url}/kustomize%2Fv${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_${OS}_${ARCH}.tar.gz | \
24+
tar xz
25+
26+
echo '>>> Installing Flagger'
27+
${REPO_ROOT}/bin/kustomize build ${REPO_ROOT}/test/gatewayapi | kubectl apply -f -
28+
29+
kubectl -n projectcontour set image deployment/flagger flagger=test/flagger:latest
30+
kubectl -n projectcontour rollout status deployment/flagger

test/gatewayapi/kustomization.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace: projectcontour
2+
bases:
3+
- ../../kustomize/base/flagger/
4+
- ../../kustomize/base/prometheus/
5+
patchesStrategicMerge:
6+
- patch.yaml

test/gatewayapi/patch.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: flagger
5+
spec:
6+
template:
7+
spec:
8+
containers:
9+
- name: flagger
10+
image: aryan9600/flagger
11+
args:
12+
- -log-level=debug
13+
- -include-label-prefix=app.kubernetes.io
14+
- -mesh-provider=gatewayapi
15+
- -metrics-server=http://flagger-prometheus:9090

test/gatewayapi/run.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
set -o errexit
4+
5+
REPO_ROOT=$(git rev-parse --show-toplevel)
6+
DIR="$(cd "$(dirname "$0")" && pwd)"
7+
8+
"$DIR"/install.sh
9+
10+
"$REPO_ROOT"/test/workloads/init.sh
11+
"$DIR"/run-canary.sh

0 commit comments

Comments
 (0)