budimanjojo / talhelper

A tool to help creating Talos kubernetes cluster
https://budimanjojo.github.io/talhelper
BSD 3-Clause "New" or "Revised" License
311 stars 19 forks source link

[Feature request] gencommand for (soft) resetting nodes #333

Closed wouterbouvy closed 10 months ago

wouterbouvy commented 10 months ago

Hi @budimanjojo,

Still loving you tool very much! I would like to pitch a feature request to generate commands to reset my nodes. Personally I like to reset my nodes back to maintenance state, so I can redeploy quickly. I do that by only wiping the STATE and EPHEMERAL and rebooting the node afterwards. I choose to not wait on completion and to do an ungraceful reset (since I'm nuking the whole cluster)

Example: talosctl reset --reboot --system-labels-to-wipe STATE --system-labels-to-wipe EPHEMERAL --graceful=false --wait=false --context talos-dev -n 10.0.88.1

However, I need to do it node by node now in a script. I rather use something like: talhelper gencommand reset

Get the idea? What do you think?

budimanjojo commented 10 months ago

@wouterbouvy Thank you!

I added the PR, just like other gencommand commands, you'll need to add those extra-flags into the command which is quite long for the example you provided above: talhelper gencommand reset -n 10.0.88.1 --extra-flags "--reboot --system-labels-to-wipe STATE --system-labels-to-wipe EPHEMERAL --gracefull=false --wait=false --context talos-dev"

Maybe you have another idea?

wouterbouvy commented 10 months ago

Using the extra-flags option is fine. This way the command caters for anybody's needs. Tnx for the quick reply and fix

budimanjojo commented 10 months ago

@wouterbouvy I've released the version with this feature. Thank you!

wouterbouvy commented 10 months ago

Tested. Working as expected! Tnx! Did you see my review of the PR? I think there is a typo in there.

budimanjojo commented 9 months ago

@wouterbouvy No I didn't, and I can't find it. Maybe GitHub broke? I also didn't find the typo u mentioned so can u point it out again? 😆