-
Notifications
You must be signed in to change notification settings - Fork 592
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
Refactor talosctl command #10133
Comments
Muscle memory need to be retrained but sounds good. But what about an option -n all Could be interesting for certain commands like talosctl dashboard or talosctl run dashboard. Because bash completion is not working with the required format -n node1,node2,no |
I believe the change makes sense. There will be some re-training of the muscle memory but it looks more coherent. |
That, plus
Edit, that would overload the |
I think we need to offer more options for where commands are run, but it would be impossible to built in all flexibility without making it config driven. One of the things that makes it difficult is if you're using clusters with omni then omni becomes your endpoint and I think it's important to address but wouldn't be changed with this issue. This one is strictly focused on the command structure. |
some suggestions:
|
In general I hate more typing, but I do understand the need for restructure things
I associate |
I generally like the verb/noun approach, it's more intuitive for new users and more in line with other cli like kubectl. I think the proposal looks pretty neat, although I do agree that it would be nice to have a version of |
Thanks everyone for the feedback. For everyone looking for |
Feature Request
Update
talosctl
to have the following subcommands structured as verbs (apply, edit, gen, get, run), nouns (etcd, k8s, node), and maintenance (completion, config, help, version).This replaces or moves a significant portion of subcommands to categorize them into one of these other groups.
Here is a high level table of how existing commands would be removed, moved, or modified
apply-config, apply
apply
withserviceaccount
subcommandapply-config
bootstrap
etcd bootstrap
cluster create/destroy/show
kubernetes cluster
completion bash/zsh
completion bash/zsh
config
(all subcommands)config
with addedvalidate
conformance
kubernetes ca
containers, c
get containers
copy, cp
run
dashboard
run
disks
get
dmesg
run
edit
edit
with--patch
optionetcd
(all subcommands)etcd
with addedbootstrap
events
gen
(all subcommands)gen
get
get
with expanded subcommandshealth
get
help
help
image, images
get
inject
inspect
kubeconfig
get
list, ls
run
logs
get service
machineconfig
memory, m, free
run
meta
node
mounts, mount
run
netstat, ss
run
patch
pcap, tcpdump
run
processes, p, ps
run
read, cat
run
reboot
run
reset
node
restart
run
rollback
node
rotate-ca
kubernetes ca
service, services
get
shutdown
run
stats
get containers
support
run
time
get
upgrade
node
upgrade-k8s
kubernetes
usage, du
run
validate
config
version
version
kubernetes
commandrun shell
commandrun kubectl
commandnode
command groupDescription
We would like to update the command structure of
talosctl
into a more thoughtful (and hopefully consistent) structure that's easier to discover commands and understand how they should be used.The main goal is not to add a lot more functionality but to clean up how the CLI has evolved over time.
One of the biggest changes is a
run
subcommand which is intended to be used for debugging nodes. This has many of the common debug commands (egls
,ss
,ps
) and will also be able to be used interactively as a "shell". This would take the place ofssh
but still give a familiarssh
feeling of debugging a single node without always needing to specify--node
and--endpoint
.Getting this structure in place will help us clean up a lot of cruft and extend talosctl to be more flexible in the future.
Removed commands
The commands we would remove will be
apply-config
,events
,inject
,machineconfig
,inspect
, andpatch
.apply-config
would be removed in favor of apply because it is a more common command for admins to use. It’s already aliased to apply so it should be the easiest removal.events
isn’t a command we’re using inside talos. If it has use cases then we could possibly move it under get events.inject
currently only applies to service accounts and we can move that functionality to an apply flag or via traditional kubectl commands.machineconfig
is duplicated with gen and isn’t needed as a separate command. If there are other use cases please let us know.inspect
is a command that is primarily used for development and not needed for administration. If we want to keep this command (or something like it) we should move it to a dedicated development debugging tool.patch
is duplicated with apply and edit. If we want to have an automatic way to edit a resource with a patch file we can add a--file
option to edit which might be easier for user to find.Migration process
We will want to keep the existing command structure and new structure for at least 2 releases where possible. There are some command flags that would overlap or be incompatible and we'll need to make sure those commands are safe to run.
We will hide the old structure from the
help
output so users can get used to the new structure but old subcommands would still be available.Internally this proposal can be referenced as RFD-13
The text was updated successfully, but these errors were encountered: