This is an automated email from the ASF dual-hosted git repository.
ccondit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-k8shim.git
The following commit(s) were added to refs/heads/master by this push:
new 5d86c0e6 [YUNIKORN-2336] Add Makefile targets to start / stop dev
cluster (#768)
5d86c0e6 is described below
commit 5d86c0e6109310b92c488d10fef4a9054c6435f1
Author: Craig Condit <[email protected]>
AuthorDate: Fri Jan 26 10:37:22 2024 -0600
[YUNIKORN-2336] Add Makefile targets to start / stop dev cluster (#768)
Add Makefile targets 'start-cluster' and 'stop-cluster' to make
launching development environments with YuniKorn installed easier.
These targets take variables K8S_VERSION (to override the Kubernetes
version),
CLUSTER_NAME (to set a custom Kind cluster name), and PLUGIN (set to 1 for
plugin mode).
A new Kind cluster will be created (or recreated) and the latest YuniKorn
image will be built and installed into this cluster.
Closes: #768
---
Makefile | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/Makefile b/Makefile
index 4a642a52..113f82e5 100644
--- a/Makefile
+++ b/Makefile
@@ -59,6 +59,19 @@ TEST_SERVER_BINARY=web-test-server
TOOLS_DIR=tools
REPO=github.com/apache/yunikorn-k8shim/pkg
+# Default values for dev cluster
+ifeq ($(K8S_VERSION),)
+K8S_VERSION := v1.29.0
+endif
+ifeq ($(CLUSTER_NAME),)
+CLUSTER_NAME := yk8s
+endif
+ifeq ($(PLUGIN),1)
+ PLUGIN_OPTS := --plugin
+else
+ PLUGIN_OPTS :=
+endif
+
# Version parameters
DATE=$(shell date +%FT%T%z)
ifeq ($(VERSION),)
@@ -518,6 +531,15 @@ arch:
@echo DOCKER_ARCH=$(DOCKER_ARCH)
@echo EXEC_ARCH=$(EXEC_ARCH)
+# Start dev 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
+stop-cluster: $(KIND_BIN)
+ @"$(KIND_BIN)" delete cluster --name="$(CLUSTER_NAME)"
+
# Run the e2e tests, this assumes yunikorn is running under yunikorn namespace
.PHONY: e2e_test
e2e_test: tools
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]