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

Add brace expansion support in talosctl #9957

Open
maxpain opened this issue Dec 15, 2024 · 3 comments
Open

Add brace expansion support in talosctl #9957

maxpain opened this issue Dec 15, 2024 · 3 comments

Comments

@maxpain
Copy link
Contributor

maxpain commented Dec 15, 2024

Feature Request

Add brace expansion in talosctl

Description

It would be pretty handy to allow run commands like that:

talosctl apply-config --nodes 10.0.0.{5..15}
@maxpain maxpain changed the title Add brace expansion in talosctl Add brace expansion support in talosctl Dec 15, 2024
@maxpain
Copy link
Contributor Author

maxpain commented Dec 15, 2024

kubectl supports this btw
image

@nberlee
Copy link
Contributor

nberlee commented Dec 16, 2024

To my understanding, brace expansion is a shell feature, similar to how wildcards work. This is why it functions seamlessly with commands like kubectl uncordon, which inherently support processing multiple nodes at once.

In contrast, talosctl --nodes requires nodes to be explicitly separated by commas rather than spaces, which is your problem I think. as --nodes is a parameter which can only have one value

@rothgar
Copy link
Member

rothgar commented Dec 16, 2024

@nberlee is correct. This is a shell feature and the fact that nodes requires a comma between nodes. You can replace the space with a comma with something like this

talosctl apply -n $(echo 10.10.1.{1..10} | tr ' ' ,)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants