elastisys / compliantkubernetes-kubespray

Apache License 2.0
26 stars 7 forks source link

Add flags to remove node to allow ungraceful removals #346

Open aarnq opened 5 months ago

aarnq commented 5 months ago

Is your feature request related to a problem? Please describe.

If one wants to properly remove nodes with kubespray, even if the nodes have failed, then you need to add reset_nodes=false and allow_ungraceful_removal=true under -e. However it should be under the same -e as the node argument, so we need to extend it a bit, so that it can have the same protection as regular node removals.

Describe the solution you'd like A flag --ungraceful or similar to remove node command to run with this set.

Definition of done:

OlleLarsson commented 5 months ago

Okay not sure but I have at least successfully used

./bin/ck8s-kubespray remove-node wc "node"  -e reset_nodes=false -e allow_ungraceful_removal=true

but maybe that didn't work as I thought it did

aarnq commented 5 months ago

@OlleLarsson all ansible examples and docs I found during the time it only ever showed that everything had to be under the same -e but maybe that is not the case, however given how that thing works I didn't want to test it out when needing it.

I still think we should add it as a flag so people can more easily see that there is an alternative when the node you are trying to remove is unreachable.