@@ -99,6 +99,7 @@ func KubeadmControlPlaneTemplateFuzzFuncs(_ runtimeserializer.CodecFactory) []in
99
99
spokeDiscovery ,
100
100
hubKubeadmConfigSpec ,
101
101
hubNodeRegistrationOptions ,
102
+ hubKubeadmControlPlaneTemplate ,
102
103
spokeKubeadmControlPlaneTemplate ,
103
104
spokeRemediationStrategy ,
104
105
spokeKubeadmControlPlaneTemplateMachineTemplate ,
@@ -364,6 +365,15 @@ func spokeClusterConfiguration(in *bootstrapv1beta1.ClusterConfiguration, c rand
364
365
}
365
366
}
366
367
368
+ func hubKubeadmControlPlaneTemplate (in * controlplanev1.KubeadmControlPlaneTemplate , c randfill.Continue ) {
369
+ c .FillNoCustom (in )
370
+
371
+ // In v1beta2 Type is required and RollingUpdateStrategyType is the only valid value.
372
+ if in .Spec .Template .Spec .Rollout .Strategy .Type == "" {
373
+ in .Spec .Template .Spec .Rollout .Strategy .Type = controlplanev1 .RollingUpdateStrategyType
374
+ }
375
+ }
376
+
367
377
func spokeKubeadmControlPlaneTemplate (in * KubeadmControlPlaneTemplate , c randfill.Continue ) {
368
378
c .FillNoCustom (in )
369
379
@@ -384,6 +394,13 @@ func spokeKubeadmControlPlaneTemplate(in *KubeadmControlPlaneTemplate, c randfil
384
394
if reflect .DeepEqual (in .Spec .Template .Spec .MachineNamingStrategy , & MachineNamingStrategy {}) {
385
395
in .Spec .Template .Spec .MachineNamingStrategy = nil
386
396
}
397
+
398
+ // In v1beta1 Type was always defaulted to RollingUpdateStrategyType.
399
+ // RollingUpdateStrategyType is also the only valid value.
400
+ if in .Spec .Template .Spec .RolloutStrategy != nil &&
401
+ in .Spec .Template .Spec .RolloutStrategy .Type == "" {
402
+ in .Spec .Template .Spec .RolloutStrategy .Type = RollingUpdateStrategyType
403
+ }
387
404
}
388
405
389
406
func spokeRemediationStrategy (in * RemediationStrategy , c randfill.Continue ) {
0 commit comments