Skip to content

Commit

Permalink
Why different?
Browse files Browse the repository at this point in the history
Signed-off-by: Kimmo Lehto <[email protected]>
  • Loading branch information
kke committed Aug 28, 2024
1 parent eb83f98 commit b3855d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ func (h *Host) FlagsChanged() bool {
log.Debugf("%s: no installFlags", h)
return false
}

// format the flags the same way as spf13/cobra does in k0s
for _, flag := range flags[3:] {
var key string
Expand Down Expand Up @@ -621,7 +622,7 @@ func (h *Host) FlagsChanged() bool {

k0sArgs := h.Metadata.K0sStatusArgs
if len(k0sArgs) != len(formattedFlags) {
log.Debugf("%s: installFlags seem to have changed because of different length: %d vs %d", h, len(k0sArgs), len(formattedFlags))
log.Debugf("%s: installFlags seem to have changed because of different length: %d [%v] vs %d [%v]", h, len(k0sArgs), k0sArgs, len(formattedFlags), formattedFlags)
return true
}
sort.Strings(formattedFlags)
Expand Down

0 comments on commit b3855d0

Please sign in to comment.