Skip to content
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

[Feature Request] Confirm popup for destructive action #2076

Open
roeniss opened this issue May 8, 2023 · 2 comments
Open

[Feature Request] Confirm popup for destructive action #2076

roeniss opened this issue May 8, 2023 · 2 comments
Labels
enhancement New feature or request InProgress Marks an issue has being worked on

Comments

@roeniss
Copy link

roeniss commented May 8, 2023




Is your feature request related to a problem? Please describe.
Some commands like ctrl-d is not revokable but could be run by accident without any obstacle, in production cluster.

Describe the solution you'd like

  • Provide CONFIRM_BEFORE_DESTRUCTIVE_ACTION option(flag).
  • If this option is enabled, every descructive actions (e.g., drain, delete, kill, ...) make popup appear, and only exeucted if user move focus box and hit enter.

Describe alternatives you've considered
First time I thought that I could avoid this trouble by making this key bindings to impossible combination like ctrl-d-y-u-p-n, but AFAIK it's not possible to change default keybindings. source

Additional context
.

@derailed derailed added enhancement New feature or request InProgress Marks an issue has being worked on labels Nov 22, 2023
@jtcressy
Copy link

jtcressy commented Dec 5, 2023

Adding some more potential solutions:

  • In addition to CONFIRM_BEFORE_DESTRUCTIVE_ACTION, provide --confirm-destructive via cli args. (similar usage to --readonly)
  • On destructive action, make a popup appear with a text field that requires the user to type 'delete', then move focus to OK option before hitting enter.

This extra required input should interrupt the muscle memory of ctrl-d, TAB, enter and prevent accidents. Plus, users can alias k9c="k9s --confirm-desctructive" for quick access when accessing sensitive environments like production and want an extra layer of safety.

@chrissnell
Copy link

chrissnell commented Oct 17, 2024

+1 for requiring a text phrase. I almost deleted a critical app from a production cluster today when muscle memory had me pressing ctrl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request InProgress Marks an issue has being worked on
Projects
None yet
Development

No branches or pull requests

4 participants