Skip to content
This repository was archived by the owner on Jul 26, 2022. It is now read-only.

Commit f815afd

Browse files
authored
fix: e2e tests to work with kind 0.9.0 + bump k8s version used (#498)
1 parent f879f78 commit f815afd

File tree

5 files changed

+23
-30
lines changed

5 files changed

+23
-30
lines changed

.github/workflows/workflow.yml

+3-8
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,10 @@ jobs:
1919
name: E2E
2020
strategy:
2121
matrix:
22-
disableCustomResourceManager: ['true', 'false']
23-
helmVersion: ['V2', 'V3']
22+
disableCustomResourceManager: ["true", "false"]
23+
helmVersion: ["V2", "V3"]
2424
steps:
2525
- uses: actions/checkout@v2
26-
- name: Setup node
27-
uses: actions/setup-node@v1
28-
with:
29-
node-version: 12
3026
- uses: azure/setup-helm@v1
3127
with:
3228
version: v2.16.1
@@ -35,5 +31,4 @@ jobs:
3531
run: |
3632
helm init --client-only
3733
if: matrix.helmVersion == 'V2'
38-
- run: npm install
39-
- run: npm run test-e2e -- ${{ matrix.disableCustomResourceManager }} ${{ matrix.helmVersion }}
34+
- run: ./e2e/run-e2e-suite.sh ${{ matrix.disableCustomResourceManager }} ${{ matrix.helmVersion }}

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ typings/
5858
.next
5959

6060
# e2e test stuff
61-
e2e/.kubeconfig
61+
e2e/**/.kubeconfig

e2e/Dockerfile

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
FROM node:12.18.2-alpine
22

3-
RUN npm install [email protected] -g
4-
53
# Setup source directory
64
RUN mkdir /app
75
WORKDIR /app

e2e/kind.yaml

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
kind: Cluster
2-
apiVersion: kind.sigs.k8s.io/v1alpha3
2+
apiVersion: kind.x-k8s.io/v1alpha4
33
networking:
44
apiServerPort: 6443
55
kubeadmConfigPatches:
6-
- |
7-
apiVersion: kubelet.config.k8s.io/v1beta1
8-
kind: KubeletConfiguration
9-
metadata:
10-
name: config
11-
# this is only relevant for btrfs uses
12-
# https://github.com/kubernetes/kubernetes/issues/80633#issuecomment-550994513
13-
featureGates:
14-
LocalStorageCapacityIsolation: false
6+
- |
7+
apiVersion: kubelet.config.k8s.io/v1beta1
8+
kind: KubeletConfiguration
9+
metadata:
10+
name: config
11+
# this is only relevant for btrfs uses
12+
# https://github.com/kubernetes/kubernetes/issues/80633#issuecomment-550994513
13+
featureGates:
14+
LocalStorageCapacityIsolation: false
1515
nodes:
16-
- role: control-plane
17-
- role: worker
18-
- role: worker
16+
- role: control-plane
17+
- role: worker
18+
- role: worker

e2e/run-e2e-suite.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ DISABLE_CUSTOM_RESOURCE_MANAGER=${1:-true}
1818
HELM_VERSION=${2:-V3}
1919

2020
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
21-
KIND_LOGGING="--quiet"
21+
KIND_LOGGING=""
2222
if ! [ -z "$DEBUG" ]; then
2323
set -x
2424
KIND_LOGGING="--verbosity=4"
@@ -35,7 +35,7 @@ RED='\e[35m'
3535
NC='\e[0m'
3636
BGREEN='\e[32m'
3737

38-
K8S_VERSION=${K8S_VERSION:-v1.15.11}
38+
K8S_VERSION=${K8S_VERSION:-v1.16.15}
3939
KIND_CLUSTER_NAME="external-secrets-dev"
4040
REGISTRY=external-secrets
4141

@@ -47,20 +47,20 @@ echo -e "${BGREEN}[dev-env] creating Kubernetes cluster with kind${NC}"
4747
kind create cluster \
4848
${KIND_LOGGING} \
4949
--name ${KIND_CLUSTER_NAME} \
50-
--config ${DIR}/kind.yaml \
50+
--config "${DIR}/kind.yaml" \
5151
--image "kindest/node:${K8S_VERSION}"
5252

5353
echo -e "${BGREEN}building external-secrets images${NC}"
54-
docker build -t external-secrets:test -f $DIR/../Dockerfile $DIR/../
55-
docker build -t external-secrets-e2e:test -f $DIR/Dockerfile $DIR/../
54+
docker build -t external-secrets:test -f "$DIR/../Dockerfile" "$DIR/../"
55+
docker build -t external-secrets-e2e:test -f "$DIR/Dockerfile" "$DIR/../"
5656
kind load docker-image --name="${KIND_CLUSTER_NAME}" external-secrets-e2e:test
5757
kind load docker-image --name="${KIND_CLUSTER_NAME}" external-secrets:test
5858

5959
function cleanup {
6060
set +e
6161
kubectl delete pod e2e 2>/dev/null
6262
kubectl delete crd/externalsecrets.kubernetes-client.io 2>/dev/null
63-
kubectl delete -f ${DIR}/localstack.deployment.yaml 2>/dev/null
63+
kubectl delete -f "${DIR}/localstack.deployment.yaml" 2>/dev/null
6464
kind delete cluster \
6565
${KIND_LOGGING} \
6666
--name ${KIND_CLUSTER_NAME}

0 commit comments

Comments
 (0)