Repository navigation
build: set kube version via debug.BuildInfo - #31296
Conversation
20c5fac to
a57ff51
Compare
498c39d to
e4d28fe
Compare
TerryHowe
left a comment
There was a problem hiding this comment.
/lgtm
I threw some prints in to validate because I'm not sure how else this might be displayed. Any thoughts on adding k8s version to helm version?
The way to validate today is to use a chart that templates out I was going to make a followup PR to expose in |
5d148ed to
44f861b
Compare
There was a problem hiding this comment.
/lgtm
The more comprehensive tests suite pass for me. My understanding is helm version in a follow up:
version.BuildInfo{Version:"v4.0+unreleased", GitCommit:"44f861be29c9f161e97662707de91010e1a6dc54", GitTreeState:"clean", GoVersion:"go1.25.1", KubeClientVersion:"v."}
7224997 to
8da96f0
Compare
This was a mistake / bad merge. Now fixed |
TerryHowe
left a comment
There was a problem hiding this comment.
/lgtm
version.BuildInfo{Version:"v4.0+unreleased", GitCommit:"8da96f043b24d50f1312fe8f8c340fc14014d697", GitTreeState:"clean", GoVersion:"go1.25.3", KubeClientVersion:"v1.34"}
Signed-off-by: Branch Vincent <[email protected]> Signed-off-by: George Jenkins <[email protected]>
8da96f0 to
c6d9a5b
Compare
…rride Non-standard build toolchains (Bazel) cannot use debug.ReadBuildInfo(), so add -X ldflags variables (kubeClientVersionMajorOverride, kubeClientVersionMinorOverride) that take precedence when set. This partially reverts the approach from PR helm#31296, allowing Bazel builds to specify the client-go version without relying on debug.BuildInfo. Signed-off-by: Md Mushfiqur Rahim <[email protected]> Signed-off-by: Developer <[email protected]>
…rride Non-standard build toolchains (Bazel) cannot use debug.ReadBuildInfo(), so add -X ldflags variables (kubeClientVersionMajorOverride, kubeClientVersionMinorOverride) that take precedence when set. This partially reverts the approach from PR helm#31296, allowing Bazel builds to specify the client-go version without relying on debug.BuildInfo. Signed-off-by: MD-Mushfiqur123 <[email protected]>
…rride Non-standard build toolchains (Bazel) cannot use debug.ReadBuildInfo(), so add -X ldflags variables (kubeClientVersionMajorOverride, kubeClientVersionMinorOverride) that take precedence when set. This partially reverts the approach from PR helm#31296, allowing Bazel builds to specify the client-go version without relying on debug.BuildInfo. Signed-off-by: MD-Mushfiqur123 <[email protected]>
…rride Non-standard build toolchains (Bazel) cannot use debug.ReadBuildInfo(), so add -X ldflags variables (kubeClientVersionMajorOverride, kubeClientVersionMinorOverride) that take precedence when set. This partially reverts the approach from PR helm#31296, allowing Bazel builds to specify the client-go version without relying on debug.BuildInfo. Signed-off-by: MD-Mushfiqur123 <[email protected]>
…rride Non-standard build toolchains (Bazel) cannot use debug.ReadBuildInfo(), so add -X ldflags variables (kubeClientVersionMajorOverride, kubeClientVersionMinorOverride) that take precedence when set. This partially reverts the approach from PR helm#31296, allowing Bazel builds to specify the client-go version without relying on debug.BuildInfo. Signed-off-by: MD-Mushfiqur123 <[email protected]>
What this PR does / why we need it:
Read the Kubernetes client version (the
client-golibrary version) directly from from Go's internalruntime.DebugInfo. Rather than setting the link time build variables.The PR is an update of #13180 with some (needed) changes
Thanks to @branchvincent for the idea and initial implementation
Special notes for your reviewer:
If applicable:
docs neededlabel should be applied if so)