The Risks of `i` as the set-image hotkey
Describe the bug So I'm debating if this is a bug or not. But it felt less like a feature request.
k9s currently binds the key i on the deployment, statefulset, etc screens to perform what is essentially the set-image imperative from kubectl. Nice functionality, but it comes with a bit of risk as I unfortunately found out.
We run a decently large cluster, so sometimes k9s UI can be a little slow to respond. (But also shoutout v0.50 for its big performance improvements).
What I saw occur was I thought I was doing was searching for /istio. But having not hit /, I entered the set-image dialogue on the i key press, but it didn't come up quickly and the dialogue received stio<enter> at the end of the current image tag in the dialogue.
In my case, I was moving pretty fast and didn't even see the dialogue until my application was in IPBO for half its pods and I saw it via its monitors.
My proposal would be to move the set-image imperative to either have a different hotkey or a confirmation that requires additional interaction. It doesn't necessarily look like Control+I is a super viable option on those screens as it's used for index sorting and some other functions. Shift+I might be available.
This isn't a big one, but it did bite pretty hard and I wanted to see what the thoughts on update the hotkey are.
I also may consider locally remapping it in the short term.
To Reproduce Steps to reproduce the behavior:
- Go to 'dp' with at least 1 deployment visible
- Hit
i - Type
stioand hit enter - Have your existing deployment's image patched to
<currentValue>stio, potentially unexpectedly.
Historical Documents
The current code binds the I key here: https://github.com/derailed/k9s/blob/ec7a660d7c696fdb8f04390952fd450a46d16c2e/internal/view/image_extender.go#L64
Expected behavior
I would like to see either a combination hot key bound for this or a confirmation that requires additionally interaction be in the dialogue that's popped up.
I also think that it might be worth putting the hotkey more visibly on the top of the deployments (and other related screens).
Screenshots
Not super applicable.
Versions (please complete the following information):
- OS: OSX
- K9s: 0.50.6, though present in many versions
- K8s: 1.31
Additional context Great tool! Even if it bit me Friday 😉
@ebachle Thanks for the heads up! Great feedback.
This get a bit trickier since you've never entered the command mode and hence triggered an action which led to the unfortunate path of perdition ;(
Switching to Shift-I would not have helped if one searched for Istio.
I'll noodle on this but I think if we switch the default action on the dialog the operation would get canceled with the <return>' Of course now it will require and extra< tab>` to set the image but much lower impact than hosing your pods...
This issue is stale because it has been open for 30 days with no activity.