Skip to content

Commit

Permalink
support 3 kubernetes versions on e2e test
Browse files Browse the repository at this point in the history
Signed-off-by: Yuma Ogami <[email protected]>
Co-authored-by: Shinya Hayashi <[email protected]>
  • Loading branch information
cupnes and peng225 committed Oct 20, 2022
1 parent 2af64e9 commit cd8ba5c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions e2e/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
KIND_NODE_VERSION := v1.24.6@sha256:97e8d00bc37a7598a0b32d1fabd155a96355c49fa0d4d4790aab0f161bf31be1
KUBERNETES_VERSION ?= 1.24
KIND_NODE_VERSION := kindest/node:v1.24.6@sha256:97e8d00bc37a7598a0b32d1fabd155a96355c49fa0d4d4790aab0f161bf31be1
KIND_CLUSTER_NAME := pie-test
# https://github.com/kubernetes-sigs/kind/releases
KIND_VERSION := v0.16.0
Expand All @@ -12,9 +13,15 @@ CURL := curl -sSLf
KIND := $(BINDIR)/kind-$(KIND_VERSION)
HELM := $(BINDIR)/helm-$(HELM_VERSION)

ifeq ($(KUBERNETES_VERSION), 1.23)
KIND_NODE_VERSION := kindest/node:v1.23.12@sha256:9402cf1330bbd3a0d097d2033fa489b2abe40d479cc5ef47d0b6a6960613148a
else ifeq ($(KUBERNETES_VERSION), 1.22)
KIND_NODE_VERSION := kindest/node:v1.22.15@sha256:bfd5eaae36849bfb3c1e3b9442f3da17d730718248939d9d547e86bbac5da586
endif

.PHONY: create-cluster
create-cluster: $(KIND) $(HELM)
$(KIND) create cluster --name $(KIND_CLUSTER_NAME) --image kindest/node:$(KIND_NODE_VERSION)
$(KIND) create cluster --name $(KIND_CLUSTER_NAME) --image $(KIND_NODE_VERSION)
$(MAKE) -C ../ docker-build IMG=pie:dev
$(KIND) load docker-image pie:dev --name $(KIND_CLUSTER_NAME)
$(MAKE) $(KUBECONFIG)
Expand Down

0 comments on commit cd8ba5c

Please sign in to comment.