Fix installFlags change detection for --enable-worker flag #803
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Partially fixes some problems reported in #801
K0sctl receives the
--enable-worker
flag as--enable-worker=true
because of how cobra works, but it itself adds the flag as--enable-worker
without the value. This causes theinstallFlags
change detection to always incorrectly detect that the flags have changed and cause a reinstall every time.The
--kubelet-extra-args
is now compared separately.Since k0s drops
--force
and--env
from the args and modifies--data-dir
,--token-file
and--config
during processing, those are ignored when comparing equality.