From 658cd398c053be6e227cabfc30dbcc78c13ae6a7 Mon Sep 17 00:00:00 2001 From: Hugo Renard Date: Wed, 25 Aug 2021 08:32:57 +0200 Subject: [PATCH] Fix apply without K0sBinaryPath always performing an upgrade (#195) * fix always upgrade * Update phase/gather_k0s_facts.go Co-authored-by: Kimmo Lehto --- phase/gather_k0s_facts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phase/gather_k0s_facts.go b/phase/gather_k0s_facts.go index 31929ab5..e7e406fe 100644 --- a/phase/gather_k0s_facts.go +++ b/phase/gather_k0s_facts.go @@ -124,7 +124,7 @@ func (p *GatherK0sFacts) needsUpgrade(h *cluster.Host) bool { // If supplimental files or a k0s binary have been specified explicitly, // always upgrade. This covers the scenario where a user moves from a // default-install cluster to one fed by OCI image bundles (ie. airgap) - if len(h.Files) != 0 || len(h.K0sBinaryPath) == 0 { + if len(h.Files) > 0 || h.K0sBinaryPath != "" { return true }