-
Notifications
You must be signed in to change notification settings - Fork 485
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 plugin: debug #248
Add plugin: debug #248
Conversation
Welcome @verb! |
/assign @ahmetb Ahmet has a bit of a context here and I'd appreciate feedback on the naming. The build that failed is using an old release of krew with an unsupported version of Go. I'm guessing that something changed in krew selector, though. Should I try to get this working with the old version? |
/cc @corneliusweig I guess we need to update the CI bits to use newer krew. |
/retest |
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.
Hey, thanks for submitting this to krew-index
, this looks pretty cool!
I think given that it requires to enable a cluster-side feature gate, it is a good idea to prefix it with alpha
. I saw that the GitHub site for this plugin says
The functionality of this plugin should eventually be included in kubectl proper.
I'm not aware of the chances of this landing in kubectl
, but if so, I'm more in favor of calling this alpha-debug
instead of alpha-debug-pod
. I would like to avoid a situation where we have a debug plugin in the index which is technically very different from an official kubectl debug
command. However, I'm also no expert here and am not aware of the differences between the approach taken by @aylei and this plugin.
One more point to note: currently this project is quite lightweight regarding documentation. Would you care to add a little more?
Finally, let's wait for @ahmetb's feedback. As he's OOO, this might take a little.
Btw, if you push changes, the CI should pass now :) |
If we call it I also assume the feature gate can be detected by the plugin? If so, the alpha- prefix isn't really necessary? We can also make a note of it. On the other hand, releasing it |
I really don't know whether to expect whether
It can't, really. We can't query the feature gates of a cluster, so the plugin just tries to add a container and it may fail.
naming is hard. :( If there isn't good support around plugin renaming then maybe we should choose a long-term name. The plugin will continue to work even if the functionality becomes native to kubectl |
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.
To me the manifest looks good already.
The naming is hard here!
So if I understood @ahmetb correctly you are saying:
debug
+ KEP -> users will transition seamlessly from plugin tokubectl
nativedebug
+KEP-> users will continue using the pluginalpha-debug
+ KEP -> users will have to switch todebug
alpha-debug
+KEP-> users will be stuck with thealpha-
command forever, because we cannot rename
This looks like the name debug
is the better bet for now. However, what about the situation where this KEP for this debug implementation gets rejected, but another one gets through? Then our users would switch to a different command with possibly quite different behavior.
I'm completely unsure how likely such a scenario is. But the shorter command name has quite an allure to it. So how about this: We take kubectl-debug
(without alpha) for now. If the KEP regarding this implementation gets rejected, we start a migration of the plugin away from the canonical name to something else and add a deprecation notice to the debug
plugin (like "this plugin has been renamed to >ephemeral-debug<")
@corneliusweig I'm mostly waiting for it to be renamed. Feel free to ping me again. Per my/your comment above, |
Ping @verb you can rename the |
@ahmetb @corneliusweig renamed! |
/retitle Add plugin: debug Note: We're making an exception for a generic name because this command has been in the KEP process for a while and has a potential path to graduation, which in case, the builtin would shadow the plugin name gracefully. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahmetb, verb The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This adds a new plugin for
kubectl alpha-debug-pod
, which attaches an ephemeral container to a running pod to be used for debugging.This plugin relies on an alpha feature to be enabled in the cluster, and users should expect it to be unstable as the feature evolves. I wanted to emphasize this, so I chose a name with "alpha" in it. (Also I didn't want to steal @aylei's plugin name from #135.)