Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YUNIKORN-2911] Add kind-e2e Makefile target #925

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
matrix:
k8s:
[
v1.31.0,
v1.31.1,
v1.30.4,
v1.29.8,
v1.28.13,
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export PATH := $(BASE_DIR)/$(TOOLS_DIR):$(GO_EXE_PATH):$(PATH)

# Default values for dev cluster
ifeq ($(K8S_VERSION),)
K8S_VERSION := v1.29.4
K8S_VERSION := v1.31.1
endif
ifeq ($(CLUSTER_NAME),)
CLUSTER_NAME := yk8s
Expand Down Expand Up @@ -705,14 +705,23 @@ arch:
@echo EXEC_ARCH=$(EXEC_ARCH)

# Start dev cluster
.PHONY: start-cluster
start-cluster: $(KIND_BIN)
@"$(KIND_BIN)" delete cluster --name="$(CLUSTER_NAME)" || :
@./scripts/run-e2e-tests.sh -a install -n "$(CLUSTER_NAME)" -v "kindest/node:$(K8S_VERSION)" $(PLUGIN_OPTS)

# Stop dev cluster
.PHONY: stop-cluster
stop-cluster: $(KIND_BIN)
@"$(KIND_BIN)" delete cluster --name="$(CLUSTER_NAME)"

# Start dev cluster, run e2e tests, stop dev cluster
.PHONY: kind-e2e
kind-e2e: $(KIND_BIN)
@"$(KIND_BIN)" delete cluster --name="$(CLUSTER_NAME)" || : ; \
./scripts/run-e2e-tests.sh -a test -n "$(CLUSTER_NAME)" -v "kindest/node:$(K8S_VERSION)" $(PLUGIN_OPTS) ; STATUS=$$? ; \
"$(KIND_BIN)" delete cluster --name="$(CLUSTER_NAME)" || : ; exit $$STATUS

# Run the e2e tests, this assumes yunikorn is running under yunikorn namespace
.PHONY: e2e_test
e2e_test: tools
Expand Down
4 changes: 2 additions & 2 deletions scripts/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@ Examples:
${NAME} -a test -n yk8s -v kindest/node:v1.28.13
${NAME} -a test -n yk8s -v kindest/node:v1.29.8
${NAME} -a test -n yk8s -v kindest/node:v1.30.4
${NAME} -a test -n yk8s -v kindest/node:v1.31.0
${NAME} -a test -n yk8s -v kindest/node:v1.31.1

Use a local helm chart path:
${NAME} -a test -n yk8s -v kindest/node:v1.31.0 -p ../yunikorn-release/helm-charts/yunikorn
${NAME} -a test -n yk8s -v kindest/node:v1.31.1 -p ../yunikorn-release/helm-charts/yunikorn
EOF
}

Expand Down