Skip to content

Commit 381718a

Browse files
committed
KCP: fix noisy error log triggered by missing patch helper
Signed-off-by: Stefan Büringer [email protected]
1 parent 52fd7eb commit 381718a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

controlplane/kubeadm/internal/control_plane.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,5 +261,10 @@ func (c *ControlPlane) PatchMachines(ctx context.Context) error {
261261

262262
// SetPatchHelpers updates the patch helpers.
263263
func (c *ControlPlane) SetPatchHelpers(patchHelpers map[string]*patch.Helper) {
264-
c.machinesPatchHelpers = patchHelpers
264+
if c.machinesPatchHelpers == nil {
265+
c.machinesPatchHelpers = map[string]*patch.Helper{}
266+
}
267+
for machineName, patchHelper := range patchHelpers {
268+
c.machinesPatchHelpers[machineName] = patchHelper
269+
}
265270
}

0 commit comments

Comments
 (0)