-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
📖 Add Go section to install clusterctl #11464
Closed
sivchari
wants to merge
1
commit into
kubernetes-sigs:main
from
sivchari:add-clusterctl-installation-manually
+14
−0
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this work for you?
It didn't for me:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply.
It didn't for me, too.
Expected
Actual
But it work when I pass the ldflags like this
Of course, I still didn't get the GitCommit etc.
Should I rewrite this section or remove it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if there is a way to make the "simple" go install work (including the correct version). Do we know if that works with some other projects and if yes, what they do differently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK both kubectl and kubeadm do not support installing with go install
TBH, I would prefer to not support go install vs supporting it with cryptic -ldflags or knowing it leads to wrong version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: with
go install
thedebug.ReadBuildInfo()
get's populated which contains a.Main.Version
.In case of
go build
this normally contains (devel), so its useless.But when using
go install [email protected]
it containsvx.x.x
.In case of using
go isntall module@CommitHash
it contains e.g.v0.0.0-20250108155011-73ddd0ddd442
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But: I'd prefer to not add this to the documentation as it leads to binaries built differently and we don't have the bandwidth to support this.
@sivchari is there a strong use case over not using the pre-compiled released binaries?
We make sure that the pre-built and released binaries are built with the right go version and these binaries get tested in CI too (for linux amd64).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @chrischdi
Thank you for good feedback. Honestly, I don't have strong use case. I usually use go install to get the binary. Thus I noticed it, but as @fabriziopandini and you said, I thought that it's better not to have various way to install clusterctl, too.
So I close this PR since I change my mind not to add this document.
Thanks all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarification :-)