Skip to content

[YUNIKORN-3174] Read go mod to get the correct kubectl version#998

Closed
pohanhuang wants to merge 2 commits intoapache:masterfrom
pohanhuang:YUNIKORN-3174
Closed

[YUNIKORN-3174] Read go mod to get the correct kubectl version#998
pohanhuang wants to merge 2 commits intoapache:masterfrom
pohanhuang:YUNIKORN-3174

Conversation

@pohanhuang
Copy link
Contributor

@pohanhuang pohanhuang commented Dec 24, 2025

What is this PR for?

What type of PR is it?

  • - Bug Fix
  • - Improvement
  • - Feature
  • - Documentation
  • - Hot Fix
  • - Refactoring

Todos

  • - Task

What is the Jira issue?

How should this be tested?

Screenshots (if appropriate)

Questions:

  • - The licenses files need update.
  • - There is breaking changes for older versions.
  • - It needs documentation.

@codecov
Copy link

codecov bot commented Dec 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.19%. Comparing base (0406fa7) to head (f95df04).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #998      +/-   ##
==========================================
+ Coverage   66.14%   66.19%   +0.05%     
==========================================
  Files          72       72              
  Lines        7723     7723              
==========================================
+ Hits         5108     5112       +4     
+ Misses       2401     2398       -3     
+ Partials      214      213       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- change the endpoint of kubectl downloading.

Signed-off-by: hhcs9527 <hhcs9527@gmail.com>
@pohanhuang
Copy link
Contributor Author

pohanhuang commented Dec 24, 2025

@chenyulin0719 should we update the default dev cluster with same setting as well?

K8S_VERSION := v1.34.0

to

K8S_VERSION :=$KUBECTL_VERSION
or
KUBECTL_VERSION=$(shell go list -m 'k8s.io/kubernetes' | cut -d' ' -f 2)

Copy link
Contributor

@chenyulin0719 chenyulin0719 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @pohanhuang, thanks for submitting this PR.

Regarding changing K8S_VERSION := v1.34.0 to match the Kubernetes version in mod.go, my only concern is that there is a small time gap between the Kubernetes release and the corresponding kind release. However, we usually upgrade the Kubernetes version only after a new kind version has been released. So I think it should be fine.

….34.0

Signed-off-by: hhcs9527 <hhcs9527@gmail.com>
@pohanhuang
Copy link
Contributor Author

pohanhuang commented Dec 26, 2025

Hi @chenyulin0719 ,
I've update the with KUBECTL_VERSION=$(shell go list -m 'k8s.io/kubernetes' | cut -d' ' -f 2)

Please help review when you are avialable, thanks

Copy link
Contributor

@chenyulin0719 chenyulin0719 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 LGTM

@chenyulin0719 chenyulin0719 changed the title [YUNIKORN-3174] read go mod to get the correct kubectl version [YUNIKORN-3174] Read go mod to get the correct kubectl version Dec 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants