@@ -316,10 +316,26 @@ func matchInitOrJoinConfiguration(machineConfig *bootstrapv1.KubeadmConfig, kcp
316316 }
317317 machineConfig = machineConfig .DeepCopy ()
318318
319+ // Cleanup ControlPlaneComponentHealthCheckSeconds from machineConfig,
320+ // because through conversion apiServer.timeoutForControlPlane in v1beta1 is converted to
321+ // initConfiguration/joinConfiguration.timeouts.controlPlaneComponentHealthCheckSeconds in v1beta2 and
322+ // this can lead to a diff here that would lead to a rollout.
323+ // Note: Changes to ControlPlaneComponentHealthCheckSeconds will apply for the next join, but they will not lead to a rollout.
324+ machineConfig .Spec .InitConfiguration .Timeouts .ControlPlaneComponentHealthCheckSeconds = nil
325+ machineConfig .Spec .JoinConfiguration .Timeouts .ControlPlaneComponentHealthCheckSeconds = nil
326+
319327 // takes the KubeadmConfigSpec from KCP and applies the transformations required
320328 // to allow a comparison with the KubeadmConfig referenced from the machine.
321329 kcpConfig := getAdjustedKcpConfig (kcp , machineConfig )
322330
331+ // Cleanup ControlPlaneComponentHealthCheckSeconds from kcpConfig,
332+ // because through conversion apiServer.timeoutForControlPlane in v1beta1 is converted to
333+ // initConfiguration/joinConfiguration.timeouts.controlPlaneComponentHealthCheckSeconds in v1beta2 and
334+ // this can lead to a diff here that would lead to a rollout.
335+ // Note: Changes to ControlPlaneComponentHealthCheckSeconds will apply for the next join, but they will not lead to a rollout.
336+ kcpConfig .InitConfiguration .Timeouts .ControlPlaneComponentHealthCheckSeconds = nil
337+ kcpConfig .JoinConfiguration .Timeouts .ControlPlaneComponentHealthCheckSeconds = nil
338+
323339 // Default both KubeadmConfigSpecs before comparison.
324340 // *Note* This assumes that newly added default values never
325341 // introduce a semantic difference to the unset value.
0 commit comments