Skip to content

Commit 6aaae2f

Browse files
authored
Merge pull request #8863 from sbueringer/pr-fix-kcp-noisy-log
🌱 KCP: fix noisy error log triggered by missing patch helper
2 parents 8150380 + 381718a commit 6aaae2f

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)