From ffd3f11642c58fac438732e945c64197bdac319a Mon Sep 17 00:00:00 2001 From: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com> Date: Tue, 17 Oct 2023 10:44:25 +0800 Subject: [PATCH] update GitHub flow for e2e test Signed-off-by: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com> --- .github/workflows/main.yaml | 13 +++++++++---- Makefile | 3 +++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6fefc156..c638d637 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -135,17 +135,22 @@ jobs: - name: Install OpenFunction run: | - # Install CRDs - make install kubectl apply -f https://openfunction.sh1a.qingstor.com/crds/gateway-api-v0.8.0.yaml # Install OpenFunction Chart helm repo add openfunction https://openfunction.github.io/charts/ helm repo update helm install openfunction openfunction/openfunction -n openfunction --create-namespace --devel -f "${GITHUB_WORKSPACE}"/.github/workflows/values + # Reinstall OpenFunction Controllers + + timeout 60s kubectl delete ns openfunction + kubectl get ns openfunction --no-headers | grep -q "Terminating" && nohup kubectl proxy --port=8080 & + kubectl get ns openfunction --no-headers | grep -q "Terminating" && kubectl get ns openfunction -ojson | jq 'del(.spec.finalizers[0])' > 0000.json + kubectl get ns openfunction --no-headers | grep -q "Terminating" && curl -k -H "Content-Type: application/json" -X PUT --data-binary @0000.json http://127.0.0.1:8080/api/v1/namespaces/openfunction/finalize + make deploy-e2e sleep 60 -# - name: Setup tmate session -# uses: mxschmitt/action-tmate@v1 + # - name: Setup tmate session + # uses: mxschmitt/action-tmate@v1 - name: Wait for kafka to be ready run: | diff --git a/Makefile b/Makefile index 44b90b0f..b0b373f0 100644 --- a/Makefile +++ b/Makefile @@ -131,6 +131,9 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config. $(KUSTOMIZE) build config/default | kubectl apply --server-side=true --force-conflicts -f - +deploy-e2e: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config. + $(KUSTOMIZE) build config/default |sed -e 's#openfunction/openfunction:latest#kind-registry:5000/openfunction/openfunction:latest#g' |kubectl apply --server-side=true --force-conflicts -f - + undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. $(KUSTOMIZE) build config/default | kubectl delete -f -