Skip to content

Commit

Permalink
WIP: allow custom kubeconfig
Browse files Browse the repository at this point in the history
Signed-off-by: Or Shoval <[email protected]>
  • Loading branch information
oshoval committed Sep 3, 2024
1 parent 83a65d3 commit 6c6d6c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
IMG ?= kubevirt-ipam-controller:latest
PASST_IMG ?= kubevirt/passt-binding-cni:latest

export KUBECONFIG ?= $(shell pwd)/.output/kubeconfig

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.29.0

Expand Down Expand Up @@ -72,7 +74,7 @@ test: manifests generate fmt vet envtest ## Run tests.
# Utilize Kind or modify the e2e tests to load the image locally, enabling compatibility with other vendors.
.PHONY: test-e2e # Run the e2e tests against a Kind k8s instance that is spun up.
test-e2e:
export KUBECONFIG=$$(pwd)/.output/kubeconfig && \
export KUBECONFIG=${KUBECONFIG} && \
export PATH=$$(pwd)/.output/ovn-kubernetes/bin:$${PATH} && \
export REPORT_PATH=$$(pwd)/.output/ && \
cd test/e2e && \
Expand Down
2 changes: 1 addition & 1 deletion hack/cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ OVN_KUBERNETES_DIR=${OUTPUT_DIR}/ovn-kubernetes
# from https://github.com/kubernetes-sigs/kind/releases
KIND_BIN=${OUTPUT_DIR}/kind

export KUBECONFIG=${OUTPUT_DIR}/kubeconfig
export KUBECONFIG=${KUBECONFIG:-${OUTPUT_DIR}/kubeconfig}

cluster_name=virt-ipam
op=$1
Expand Down

0 comments on commit 6c6d6c0

Please sign in to comment.