-
Notifications
You must be signed in to change notification settings - Fork 28
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
build: improve goreleaser stuff #290
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Rui Chen <[email protected]>
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.
Also, please describe your changes in PR description
main: ./cmd | ||
binary: kubectl-rook-ceph | ||
binary: kubectl-rook_ceph |
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.
binary: kubectl-rook_ceph | |
binary: kubectl-rook_ceph |
can you explain why this change is required and how it is helping if you use the krew plugin to install the tool above change is not required, IIUC you are consuming the release build image and directly calling the binary?
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 dont know which is more desired, that is why I propose this change to check (as I see the discrepancy with the homebrew artifact, Homebrew/homebrew-core#171289)
sounds like kubectl-rook-ceph
is preferred over kubectl-rook_ceph
?
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.
also cc @travisn for thoughts
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.
kubectl-rook_ceph
is the correct Name of the binary in order to call the plugin with kubectl rook-ceph
.
Offical kubectl Docs:
https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/#names-with-dashes-and-underscores
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.
That doc indicates that it is "possible" to use underscores, but it is not required. Seems like it is more natural to use dashes, as described earlier in the doc here.
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.
It seems to me that dashes in the filename represents a space in the kubectl command.
the command
kubectl foo bar baz
is invoked by the user, would have the filename ofkubectl-foo-bar-baz
.
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.
The commands work fine in our testing with the dash as in the readme. Are you seeing otherwise?
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 currently on vacation, so I'm unable to test anything. I'm just referring to the Kubernetes documentation, and although dashes currently works, it's not guaranteed to work in the future. I recommend using an underscore.
Just my 2 cents.
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.
So, when using binary directly(not with krew) kubectl-rook-ceph
it doesn't read it to kubectl rook-ceph
but using the binary name kubectl- rook_ceph
it reads it to kubectl rook-ceph
Checklist:
match with what is in go-test
kubectl-rook-ceph/.github/workflows/go-test.yaml
Line 42 in 4521811