diff --git a/.github/workflows/e2e-test-k8s.yml b/.github/workflows/e2e-test-k8s.yml index b4151ddf..f0da9d20 100644 --- a/.github/workflows/e2e-test-k8s.yml +++ b/.github/workflows/e2e-test-k8s.yml @@ -48,6 +48,8 @@ jobs: - name: Install kind run: | + uname -a + ldd --version go install sigs.k8s.io/kind@v0.13.0 - name: Install Helm @@ -75,6 +77,12 @@ jobs: KIND_NODE_IMAGE: kindest/node:v1.18.20@sha256:38a8726ece5d7867fb0ede63d718d27ce2d41af519ce68be5ae7fcca563537ed run: | make kind-up + KIND_NODE_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' apisix-ingress-cluster-control-plane) + echo $KIND_NODE_IP + + kubectl config get-clusters + kubectl config set-cluster kind-apisix-ingress-cluster --server=https://$KIND_NODE_IP:6443 + kubectl wait --for=condition=Ready nodes --all - name: Build images env: diff --git a/Makefile b/Makefile index f38b307b..3d389d83 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ CRD_DOCS_TEMPLATE ?= docs/assets/template INGRESS_VERSION ?= v1 -export KUBECONFIG = /tmp/$(KIND_NAME).kubeconfig +#export KUBECONFIG = /tmp/$(KIND_NAME).kubeconfig # go VERSYM="github.com/apache/apisix-ingress-controller/internal/version._buildVersion" @@ -143,7 +143,6 @@ kind-e2e-test: kind-up build-image kind-load-images e2e-test # Utilize Kind or modify the e2e tests to load the image locally, enabling compatibility with other vendors. .PHONY: e2e-test e2e-test: adc - @kind get kubeconfig --name $(KIND_NAME) > $$KUBECONFIG DASHBOARD_VERSION=$(DASHBOARD_VERSION) go test $(TEST_DIR) -test.timeout=$(TEST_TIMEOUT) -v -ginkgo.v -ginkgo.focus="$(TEST_FOCUS)" -ginkgo.label-filter="$(TEST_LABEL)" .PHONY: download-api7ee3-chart @@ -189,8 +188,6 @@ kind-up: @kind get clusters 2>&1 | grep -v $(KIND_NAME) \ && kind create cluster --name $(KIND_NAME) --image $(KIND_NODE_IMAGE) \ || echo "kind cluster already exists" - @kind get kubeconfig --name $(KIND_NAME) > $$KUBECONFIG - kubectl wait --for=condition=Ready nodes --all .PHONY: kind-down kind-down: