From 087b4a3eeceef1df605c27fb7a377aa4f88ce0eb Mon Sep 17 00:00:00 2001 From: Artem Bortnikov Date: Thu, 20 Jun 2024 14:28:37 +0300 Subject: [PATCH] run kind for e2e tests with kube-proxy in ipvs mode Signed-off-by: Artem Bortnikov --- Makefile | 7 +++---- test/e2e/config.yaml | 4 ++++ 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 test/e2e/config.yaml 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"