From f3ec013abc08741cee79180593953fb2e637b84f Mon Sep 17 00:00:00 2001 From: Shyukri Shyukriev Date: Tue, 6 Feb 2024 23:49:51 +0200 Subject: [PATCH] chore: upgrade k3d to k8s 1.27, specify kubeconfig as k3d defaults to k3s-default name Signed-off-by: Shyukri Shyukriev --- .github/workflows/ci.yaml | 1 + Makefile | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 86ac7117a5..cfb4b4b5fb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -149,5 +149,6 @@ jobs: echo '127.0.0.1 k3d-e2e-registry' | sudo tee -a /etc/hosts - name: Run tests run: | + export KUBECONFIG=$(k3d kubeconfig write e2e) IMAGE_NAMESPACE=k3d-e2e-registry:5111 VERSION=${{ github.sha }} DOCKER_PUSH=true make start EventBusDriver=${{ matrix.driver }} make test-functional diff --git a/Makefile b/Makefile index 9d25ef82af..0181cebae3 100644 --- a/Makefile +++ b/Makefile @@ -39,6 +39,7 @@ override LDFLAGS += -X ${PACKAGE}.gitTag=${GIT_TAG} endif K3D ?= $(shell [ "`command -v kubectl`" != '' ] && [ "`command -v k3d`" != '' ] && [[ "`kubectl config current-context`" =~ k3d-* ]] && echo true || echo false) +K3DCLUSTER?=e2e # Check that the needed executables are available, else exit before the build K := $(foreach exec,$(EXECUTABLES), $(if $(shell which $(exec)),some string,$(error "No $(exec) in PATH"))) @@ -74,7 +75,7 @@ image: clean $(BUILD_DIST) DOCKER_BUILDKIT=1 docker build -t $(IMAGE_NAMESPACE)/$(BINARY_NAME):$(VERSION) --target $(BINARY_NAME) -f $(DOCKERFILE) . @if [ "$(DOCKER_PUSH)" = "true" ]; then docker push $(IMAGE_NAMESPACE)/$(BINARY_NAME):$(VERSION); fi ifeq ($(K3D),true) - k3d image import $(IMAGE_NAMESPACE)/$(BINARY_NAME):$(VERSION) + k3d image import $(IMAGE_NAMESPACE)/$(BINARY_NAME):$(VERSION) --cluster $(K3DCLUSTER) endif image-linux-%: dist/$(BINARY_NAME)-linux-%