Skip to content

Commit

Permalink
Add logging
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 96b59d5 commit 59319d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -604,15 +604,19 @@ 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))
return true
}
sort.Strings(formattedFlags)
sort.Strings(k0sArgs)
for i := range formattedFlags {
if formattedFlags[i] != k0sArgs[i] {
log.Debugf("%s: installFlags seem to have changed because of different flags: %v vs %v", h, formattedFlags, k0sArgs)
return true
}
}

log.Debugf("%s: installFlags have not changed", h)

return false
}

0 comments on commit 59319d6

Please sign in to comment.