This is an automated email from the ASF dual-hosted git repository.
chenyulin0719 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 2c0807f4 [YUNIKORN-3174] Read go mod to get the correct kubectl
version (#998)
2c0807f4 is described below
commit 2c0807f4c2d535f9ea288f535a59018e1e440754
Author: hhcs9527 <[email protected]>
AuthorDate: Wed Dec 31 20:40:54 2025 +0800
[YUNIKORN-3174] Read go mod to get the correct kubectl version (#998)
Signed-off-by: hhcs9527 <[email protected]>
Closes: #998
Signed-off-by: Yu-Lin Chen <[email protected]>
---
Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index fb4c2fce..5f7b522e 100644
--- a/Makefile
+++ b/Makefile
@@ -71,7 +71,7 @@ export PATH := $(BASE_DIR)/$(TOOLS_DIR):$(GO_EXE_PATH):$(PATH)
# Default values for dev cluster
ifeq ($(K8S_VERSION),)
-K8S_VERSION := v1.34.0
+K8S_VERSION :=$(shell go list -m 'k8s.io/kubernetes' | cut -d' ' -f 2)
endif
ifeq ($(CLUSTER_NAME),)
CLUSTER_NAME := yk8s
@@ -171,7 +171,7 @@
GOLANGCI_LINT_ARCHIVEBASE=golangci-lint-$(GOLANGCI_LINT_VERSION)-$(OS)-$(EXEC_AR
export PATH := $(BASE_DIR)/$(GOLANGCI_LINT_PATH):$(PATH)
# kubectl
-KUBECTL_VERSION=v1.27.7
+KUBECTL_VERSION=$(shell go list -m 'k8s.io/kubernetes' | cut -d' ' -f 2)
KUBECTL_PATH=$(TOOLS_DIR)/kubectl-$(KUBECTL_VERSION)
KUBECTL_BIN=$(KUBECTL_PATH)/kubectl
export PATH := $(BASE_DIR)/$(KUBECTL_PATH):$(PATH)
@@ -289,7 +289,7 @@ $(KUBECTL_BIN):
@echo "installing kubectl $(KUBECTL_VERSION)"
@mkdir -p "$(KUBECTL_PATH)"
@curl -sSfL -o "$(KUBECTL_BIN)" \
-
"https://storage.googleapis.com/kubernetes-release/release/$(KUBECTL_VERSION)/bin/$(OS)/$(EXEC_ARCH)/kubectl"
&& \
+
"https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/$(OS)/$(EXEC_ARCH)/kubectl"
&& \
chmod +x "$(KUBECTL_BIN)"
# Install kind
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]