Skip to content

Commit

Permalink
chore: upgrade k3d to k8s 1.27, specify kubeconfig as k3d defaults to…
Browse files Browse the repository at this point in the history
… k3s-default name

Signed-off-by: Shyukri Shyukriev <shukera@gmail.com>
  • Loading branch information
shyukri committed Feb 7, 2024
1 parent 67a3c5c commit 3f49938
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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")))
Expand Down Expand Up @@ -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-%
Expand Down

0 comments on commit 3f49938

Please sign in to comment.