talos icon indicating copy to clipboard operation
talos copied to clipboard

add context delete option

Open Ulexus opened this issue 3 years ago • 1 comments

Feature Request

Especially since adding contexts can be automated, we should add a context remove CLI option, as well.

talosctl context remove XXXX

Ideally, this should allow glob patterns, too: talosctl context remove talos-default-*.

Description

Ulexus avatar Jul 27 '21 18:07 Ulexus

Love this Idea

It would be nice, if this can delete the kubernetes context too

hobyte avatar Sep 12 '22 20:09 hobyte

There's already the talosctl config add <myctx> command to add new contexts. It would make much more sense to plan the new sub-command as talosctl config remove <myctx>.

murtaza-u avatar Dec 21 '22 04:12 murtaza-u

@murtaza-u are you going to open pull request?

DmitriyMV avatar Dec 21 '22 14:12 DmitriyMV

@DmitriyMV Yeah...shortly.

murtaza-u avatar Dec 21 '22 15:12 murtaza-u

Just wanted to say, that we probably want confirmation dialogue for each match individually.

DmitriyMV avatar Dec 21 '22 15:12 DmitriyMV

Yeah that actually makes sense. The way I have it setup is that there's only one confirmation dialogue for all the matches. Any suggestion on how we should go about designing this? May be a flag like --step which steps over each match one by one.

murtaza-u avatar Dec 21 '22 15:12 murtaza-u

noconfirm should be enough when you want to delete every match without confirmations. For completeness there could probably be a dry mode which will basically show what will be deleted.

DmitriyMV avatar Dec 21 '22 15:12 DmitriyMV

Closed in #6671

DmitriyMV avatar Jan 10 '23 14:01 DmitriyMV