From 53d59a81dfe63dae9560ebc2ece98699ee283d58 Mon Sep 17 00:00:00 2001 From: justinsb Date: Thu, 30 Nov 2023 18:28:03 -0500 Subject: [PATCH] feat: nodeup will only check the nodeupConfigHash if it is provided On bare metal, the nodeupConfig is harder to predict and we will have to use other ways to trigger an update anyway. --- upup/pkg/fi/nodeup/command.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/upup/pkg/fi/nodeup/command.go b/upup/pkg/fi/nodeup/command.go index c511f643c90fa..188f9ee076373 100644 --- a/upup/pkg/fi/nodeup/command.go +++ b/upup/pkg/fi/nodeup/command.go @@ -154,8 +154,10 @@ func (c *NodeUpCommand) Run(out io.Writer) error { return fmt.Errorf("no instance group defined in nodeup config") } - if want, got := bootConfig.NodeupConfigHash, base64.StdEncoding.EncodeToString(nodeupConfigHash[:]); got != want { - return fmt.Errorf("nodeup config hash mismatch (was %q, expected %q)", got, want) + if want := bootConfig.NodeupConfigHash; want != "" { + if got := base64.StdEncoding.EncodeToString(nodeupConfigHash[:]); got != want { + return fmt.Errorf("nodeup config hash mismatch (was %q, expected %q)", got, want) + } } err = evaluateSpec(&nodeupConfig, bootConfig.CloudProvider)