diff --git a/Makefile b/Makefile index b324f38c..89b9ff1c 100644 --- a/Makefile +++ b/Makefile @@ -203,11 +203,10 @@ kind-load: docker-build kind ## Build and upload docker image to the local Kind .PHONY: kind-create kind-create: kind yq ## Create kubernetes cluster using Kind. @if ! $(KIND) get clusters | grep -q $(KIND_CLUSTER_NAME); then \ - $(KIND) create cluster --name $(KIND_CLUSTER_NAME) --image kindest/node:$(K8S_VERSION); \ - fi - @if ! $(CONTAINER_TOOL) container inspect $$($(KIND) get nodes) | $(YQ) e '.[0].Config.Image' | grep -q $(K8S_VERSION); then \ + $(KIND) create cluster --name $(KIND_CLUSTER_NAME) --image kindest/node:$(K8S_VERSION) --config test/e2e/config.yaml; \ + elif ! $(CONTAINER_TOOL) container inspect $$($(KIND) get nodes --name $(KIND_CLUSTER_NAME)) | $(YQ) e '.[0].Config.Image' | grep -q $(K8S_VERSION); then \ $(KIND) delete cluster --name $(KIND_CLUSTER_NAME); \ - $(KIND) create cluster --name $(KIND_CLUSTER_NAME) --image kindest/node:$(K8S_VERSION); \ + $(KIND) create cluster --name $(KIND_CLUSTER_NAME) --image kindest/node:$(K8S_VERSION) --config test/e2e/config.yaml; \ fi .PHONY: kind-delete diff --git a/test/e2e/config.yaml b/test/e2e/config.yaml new file mode 100644 index 00000000..afe81483 --- /dev/null +++ b/test/e2e/config.yaml @@ -0,0 +1,4 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +networking: + kubeProxyMode: "ipvs"