Skip to content

Commit afff7e2

Browse files
committed
Avoid KCP rollouts if only ControlPlaneComponentHealthCheckSeconds is
changed
1 parent 9e0cf62 commit afff7e2

File tree

6 files changed

+110
-20
lines changed

6 files changed

+110
-20
lines changed

api/bootstrap/kubeadm/v1beta2/kubeadm_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,11 @@ type Discovery struct {
695695
TLSBootstrapToken string `json:"tlsBootstrapToken,omitempty"`
696696
}
697697

698+
// IsDefined returns true if the Discovery is defined.
699+
func (r *Discovery) IsDefined() bool {
700+
return !reflect.DeepEqual(r, &Discovery{})
701+
}
702+
698703
// BootstrapTokenDiscovery is used to set the options for bootstrap token based discovery.
699704
// +kubebuilder:validation:MinProperties=1
700705
type BootstrapTokenDiscovery struct {

controlplane/kubeadm/internal/controllers/inplace_canupdatemachine_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,12 @@ func Test_createRequest(t *testing.T) {
619619
},
620620
},
621621
JoinConfiguration: bootstrapv1.JoinConfiguration{
622+
// This field is technically set by CABPK, but adding it here so that matchesKubeadmConfig detects this correctly as a join KubeadmConfig.
623+
Discovery: bootstrapv1.Discovery{
624+
BootstrapToken: bootstrapv1.BootstrapTokenDiscovery{
625+
APIServerEndpoint: "1.2.3.4:6443",
626+
},
627+
},
622628
NodeRegistration: bootstrapv1.NodeRegistrationOptions{
623629
KubeletExtraArgs: []bootstrapv1.Arg{{
624630
Name: "v",
@@ -635,6 +641,7 @@ func Test_createRequest(t *testing.T) {
635641
currentKubeadmConfigCleanedUp.SetGroupVersionKind(bootstrapv1.GroupVersion.WithKind("KubeadmConfig")) // cleanupKubeadmConfig adds GVK.
636642
currentKubeadmConfigCleanedUp.Status = bootstrapv1.KubeadmConfigStatus{} // cleanupKubeadmConfig drops status.
637643
defaulting.ApplyPreviousKubeadmConfigDefaults(&currentKubeadmConfigCleanedUp.Spec) // PrepareKubeadmConfigsForDiff applies defaults.
644+
currentKubeadmConfigCleanedUp.Spec.JoinConfiguration.Discovery = bootstrapv1.Discovery{} // PrepareKubeadmConfigsForDiff cleans up Discovery.
638645
currentKubeadmConfigWithOutdatedLabelsAndAnnotations := currentKubeadmConfig.DeepCopy()
639646
currentKubeadmConfigWithOutdatedLabelsAndAnnotations.Labels["outdated-label-1"] = "outdated-label-value-1"
640647
currentKubeadmConfigWithOutdatedLabelsAndAnnotations.Annotations["outdated-annotation-1"] = "outdated-annotation-value-1"
@@ -648,6 +655,7 @@ func Test_createRequest(t *testing.T) {
648655
desiredKubeadmConfigCleanedUp.SetGroupVersionKind(bootstrapv1.GroupVersion.WithKind("KubeadmConfig")) // cleanupKubeadmConfig adds GVK.
649656
desiredKubeadmConfigCleanedUp.Status = bootstrapv1.KubeadmConfigStatus{} // cleanupKubeadmConfig drops status.
650657
defaulting.ApplyPreviousKubeadmConfigDefaults(&desiredKubeadmConfigCleanedUp.Spec) // PrepareKubeadmConfigsForDiff applies defaults.
658+
desiredKubeadmConfigCleanedUp.Spec.JoinConfiguration.Discovery = bootstrapv1.Discovery{} // PrepareKubeadmConfigsForDiff cleans up Discovery.
651659

652660
currentInfraMachine := &unstructured.Unstructured{
653661
Object: map[string]interface{}{

controlplane/kubeadm/internal/filters.go

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,16 @@ func PrepareKubeadmConfigsForDiff(desiredKubeadmConfig, currentKubeadmConfig *bo
341341
desiredKubeadmConfig.Spec.JoinConfiguration.Discovery = bootstrapv1.Discovery{}
342342
currentKubeadmConfig.Spec.JoinConfiguration.Discovery = bootstrapv1.Discovery{}
343343

344+
// Cleanup ControlPlaneComponentHealthCheckSeconds from desiredKubeadmConfig and currentKubeadmConfig,
345+
// because through conversion apiServer.timeoutForControlPlane in v1beta1 is converted to
346+
// initConfiguration/joinConfiguration.timeouts.controlPlaneComponentHealthCheckSeconds in v1beta2 and
347+
// this can lead to a diff here that would lead to a rollout.
348+
// Note: Changes to ControlPlaneComponentHealthCheckSeconds will apply for the next join, but they will not lead to a rollout.
349+
desiredKubeadmConfig.Spec.InitConfiguration.Timeouts.ControlPlaneComponentHealthCheckSeconds = nil
350+
desiredKubeadmConfig.Spec.JoinConfiguration.Timeouts.ControlPlaneComponentHealthCheckSeconds = nil
351+
currentKubeadmConfig.Spec.InitConfiguration.Timeouts.ControlPlaneComponentHealthCheckSeconds = nil
352+
currentKubeadmConfig.Spec.JoinConfiguration.Timeouts.ControlPlaneComponentHealthCheckSeconds = nil
353+
344354
// If KCP JoinConfiguration.ControlPlane is nil and the Machine JoinConfiguration.ControlPlane is empty,
345355
// set Machine JoinConfiguration.ControlPlane to nil.
346356
// NOTE: This is required because CABPK applies an empty JoinConfiguration.ControlPlane in case it is nil.
@@ -531,12 +541,16 @@ func dropOmittableFields(spec *bootstrapv1.KubeadmConfigSpec) {
531541

532542
// isKubeadmConfigForJoin returns true if the KubeadmConfig is for a control plane
533543
// or a worker machine that joined an existing cluster.
534-
// Note: this check is based on the assumption that KubeadmConfig for joining
535-
// control plane and workers nodes always have a non-empty join configuration, while
536-
// instead the join configuration for the first control plane machine in the
544+
// Note: This check is based on the assumption that KubeadmConfig for joining
545+
// control plane and workers nodes always have a non-empty JoinConfiguration.Discovery, while
546+
// instead the JoinConfiguration for the first control plane machine in the
537547
// cluster is emptied out by KCP.
548+
// Note: Previously we checked if the entire JoinConfiguration is defined, but that
549+
// is not safe because apiServer.timeoutForControlPlane in v1beta1 is also converted to
550+
// joinConfiguration.timeouts.controlPlaneComponentHealthCheckSeconds in v1beta2 and
551+
// accordingly we would also detect init KubeadmConfigs as join.
538552
func isKubeadmConfigForJoin(c *bootstrapv1.KubeadmConfig) bool {
539-
return c.Spec.JoinConfiguration.IsDefined()
553+
return c.Spec.JoinConfiguration.Discovery.IsDefined()
540554
}
541555

542556
// isKubeadmConfigForInit returns true if the KubeadmConfig is for the first control plane

controlplane/kubeadm/internal/filters_test.go

Lines changed: 77 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ func TestMatchesKubeadmConfig(t *testing.T) {
339339
ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
340340
JoinConfiguration: bootstrapv1.JoinConfiguration{
341341
Timeouts: bootstrapv1.Timeouts{
342+
// ControlPlaneComponentHealthCheckSeconds is different, but it is ignored for the diff
342343
ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](5),
343344
KubernetesAPICallSeconds: ptr.To[int32](7),
344345
},
@@ -392,7 +393,8 @@ func TestMatchesKubeadmConfig(t *testing.T) {
392393
// InitConfiguration will be converted to JoinConfiguration and then compared against the JoinConfiguration from KCP.
393394
InitConfiguration: bootstrapv1.InitConfiguration{
394395
Timeouts: bootstrapv1.Timeouts{
395-
ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](5),
396+
// ControlPlaneComponentHealthCheckSeconds is different, but it is ignored for the diff
397+
ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](1),
396398
KubernetesAPICallSeconds: ptr.To[int32](7),
397399
},
398400
Patches: bootstrapv1.Patches{
@@ -420,7 +422,7 @@ func TestMatchesKubeadmConfig(t *testing.T) {
420422
g.Expect(err).ToNot(HaveOccurred())
421423
g.Expect(currentKubeadmConfig).ToNot(BeNil())
422424
g.Expect(desiredKubeadmConfig).ToNot(BeNil())
423-
g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
425+
g.Expect(desiredKubeadmConfig.Spec.InitConfiguration).To(Equal(bootstrapv1.InitConfiguration{})) // Verify that this is a join.
424426
g.Expect(match).To(BeTrue())
425427
g.Expect(reason).To(BeEmpty())
426428
})
@@ -478,7 +480,7 @@ func TestMatchesKubeadmConfig(t *testing.T) {
478480
g.Expect(err).ToNot(HaveOccurred())
479481
g.Expect(currentKubeadmConfig).ToNot(BeNil())
480482
g.Expect(desiredKubeadmConfig).ToNot(BeNil())
481-
g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
483+
g.Expect(desiredKubeadmConfig.Spec.InitConfiguration).To(Equal(bootstrapv1.InitConfiguration{})) // Verify that this is a join.
482484
g.Expect(match).To(BeTrue())
483485
g.Expect(reason).To(BeEmpty())
484486
})
@@ -536,7 +538,7 @@ func TestMatchesKubeadmConfig(t *testing.T) {
536538
g.Expect(err).ToNot(HaveOccurred())
537539
g.Expect(currentKubeadmConfig).ToNot(BeNil())
538540
g.Expect(desiredKubeadmConfig).ToNot(BeNil())
539-
g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
541+
g.Expect(desiredKubeadmConfig.Spec.InitConfiguration).To(Equal(bootstrapv1.InitConfiguration{})) // Verify that this is a join.
540542
g.Expect(match).To(BeFalse())
541543
g.Expect(reason).To(BeComparableTo(`Machine KubeadmConfig is outdated: diff: &v1beta2.KubeadmConfigSpec{
542544
ClusterConfiguration: {},
@@ -597,6 +599,12 @@ func TestMatchesKubeadmConfig(t *testing.T) {
597599
},
598600
Spec: bootstrapv1.KubeadmConfigSpec{
599601
JoinConfiguration: bootstrapv1.JoinConfiguration{
602+
// This field is technically set by CABPK, but adding it here so that matchesKubeadmConfig detects this correctly as a join KubeadmConfig.
603+
Discovery: bootstrapv1.Discovery{
604+
BootstrapToken: bootstrapv1.BootstrapTokenDiscovery{
605+
APIServerEndpoint: "1.2.3.4:6443",
606+
},
607+
},
600608
NodeRegistration: bootstrapv1.NodeRegistrationOptions{
601609
Name: "A new name",
602610
},
@@ -608,11 +616,11 @@ func TestMatchesKubeadmConfig(t *testing.T) {
608616
g.Expect(err).ToNot(HaveOccurred())
609617
g.Expect(currentKubeadmConfig).ToNot(BeNil())
610618
g.Expect(desiredKubeadmConfig).ToNot(BeNil())
611-
g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
619+
g.Expect(desiredKubeadmConfig.Spec.InitConfiguration).To(Equal(bootstrapv1.InitConfiguration{})) // Verify that this is a join.
612620
g.Expect(match).To(BeTrue())
613621
g.Expect(reason).To(BeEmpty())
614622
})
615-
t.Run("returns true if JoinConfiguration is equal apart from discovery", func(t *testing.T) {
623+
t.Run("returns true if JoinConfiguration is equal apart from Discovery and Timeouts", func(t *testing.T) {
616624
g := NewWithT(t)
617625
kcp := &controlplanev1.KubeadmControlPlane{
618626
Spec: controlplanev1.KubeadmControlPlaneSpec{
@@ -625,6 +633,9 @@ func TestMatchesKubeadmConfig(t *testing.T) {
625633
},
626634
// Discovery gets removed because Discovery is not relevant for the rollout decision.
627635
Discovery: bootstrapv1.Discovery{TLSBootstrapToken: "aaa"},
636+
Timeouts: bootstrapv1.Timeouts{
637+
ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](1),
638+
},
628639
},
629640
},
630641
Version: "v1.30.0",
@@ -656,8 +667,16 @@ func TestMatchesKubeadmConfig(t *testing.T) {
656667
NodeRegistration: bootstrapv1.NodeRegistrationOptions{
657668
Name: "A new name",
658669
},
659-
// Discovery gets removed because Discovery is not relevant for the rollout decision.
660-
Discovery: bootstrapv1.Discovery{TLSBootstrapToken: "bbb"},
670+
// This field is technically set by CABPK, but adding it here so that matchesKubeadmConfig detects this correctly as a join KubeadmConfig.
671+
// Discovery gets removed only for the diff because Discovery is not relevant for the rollout decision.
672+
Discovery: bootstrapv1.Discovery{
673+
BootstrapToken: bootstrapv1.BootstrapTokenDiscovery{
674+
APIServerEndpoint: "1.2.3.4:6443",
675+
},
676+
},
677+
Timeouts: bootstrapv1.Timeouts{
678+
ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](11),
679+
},
661680
},
662681
},
663682
},
@@ -666,7 +685,7 @@ func TestMatchesKubeadmConfig(t *testing.T) {
666685
g.Expect(err).ToNot(HaveOccurred())
667686
g.Expect(currentKubeadmConfig).ToNot(BeNil())
668687
g.Expect(desiredKubeadmConfig).ToNot(BeNil())
669-
g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
688+
g.Expect(desiredKubeadmConfig.Spec.InitConfiguration).To(Equal(bootstrapv1.InitConfiguration{})) // Verify that this is a join.
670689
g.Expect(match).To(BeTrue())
671690
g.Expect(reason).To(BeEmpty())
672691
})
@@ -710,6 +729,12 @@ func TestMatchesKubeadmConfig(t *testing.T) {
710729
},
711730
Spec: bootstrapv1.KubeadmConfigSpec{
712731
JoinConfiguration: bootstrapv1.JoinConfiguration{
732+
// This field is technically set by CABPK, but adding it here so that matchesKubeadmConfig detects this correctly as a join KubeadmConfig.
733+
Discovery: bootstrapv1.Discovery{
734+
BootstrapToken: bootstrapv1.BootstrapTokenDiscovery{
735+
APIServerEndpoint: "1.2.3.4:6443",
736+
},
737+
},
713738
NodeRegistration: bootstrapv1.NodeRegistrationOptions{
714739
Name: "A new name",
715740
},
@@ -722,7 +747,7 @@ func TestMatchesKubeadmConfig(t *testing.T) {
722747
g.Expect(err).ToNot(HaveOccurred())
723748
g.Expect(currentKubeadmConfig).ToNot(BeNil())
724749
g.Expect(desiredKubeadmConfig).ToNot(BeNil())
725-
g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
750+
g.Expect(desiredKubeadmConfig.Spec.InitConfiguration).To(Equal(bootstrapv1.InitConfiguration{})) // Verify that this is a join.
726751
g.Expect(match).To(BeTrue())
727752
g.Expect(reason).To(BeEmpty())
728753
})
@@ -780,7 +805,7 @@ func TestMatchesKubeadmConfig(t *testing.T) {
780805
g.Expect(err).ToNot(HaveOccurred())
781806
g.Expect(currentKubeadmConfig).ToNot(BeNil())
782807
g.Expect(desiredKubeadmConfig).ToNot(BeNil())
783-
g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
808+
g.Expect(desiredKubeadmConfig.Spec.InitConfiguration).To(Equal(bootstrapv1.InitConfiguration{})) // Verify that this is a join.
784809
g.Expect(match).To(BeFalse())
785810
g.Expect(reason).To(Equal(`Machine KubeadmConfig is outdated: diff: &v1beta2.KubeadmConfigSpec{
786811
ClusterConfiguration: {},
@@ -842,6 +867,12 @@ func TestMatchesKubeadmConfig(t *testing.T) {
842867
},
843868
Spec: bootstrapv1.KubeadmConfigSpec{
844869
JoinConfiguration: bootstrapv1.JoinConfiguration{
870+
// This field is technically set by CABPK, but adding it here so that matchesKubeadmConfig detects this correctly as a join KubeadmConfig.
871+
Discovery: bootstrapv1.Discovery{
872+
BootstrapToken: bootstrapv1.BootstrapTokenDiscovery{
873+
APIServerEndpoint: "1.2.3.4:6443",
874+
},
875+
},
845876
NodeRegistration: bootstrapv1.NodeRegistrationOptions{
846877
Name: "name",
847878
},
@@ -859,7 +890,7 @@ func TestMatchesKubeadmConfig(t *testing.T) {
859890
g.Expect(err).ToNot(HaveOccurred())
860891
g.Expect(currentKubeadmConfig).ToNot(BeNil())
861892
g.Expect(desiredKubeadmConfig).ToNot(BeNil())
862-
g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
893+
g.Expect(desiredKubeadmConfig.Spec.InitConfiguration).To(Equal(bootstrapv1.InitConfiguration{})) // Verify that this is a join.
863894
g.Expect(match).To(BeFalse())
864895
g.Expect(reason).To(Equal(`Machine KubeadmConfig is outdated: diff: &v1beta2.KubeadmConfigSpec{
865896
ClusterConfiguration: {},
@@ -920,6 +951,12 @@ func TestMatchesKubeadmConfig(t *testing.T) {
920951
},
921952
Spec: bootstrapv1.KubeadmConfigSpec{
922953
JoinConfiguration: bootstrapv1.JoinConfiguration{
954+
// This field is technically set by CABPK, but adding it here so that matchesKubeadmConfig detects this correctly as a join KubeadmConfig.
955+
Discovery: bootstrapv1.Discovery{
956+
BootstrapToken: bootstrapv1.BootstrapTokenDiscovery{
957+
APIServerEndpoint: "1.2.3.4:6443",
958+
},
959+
},
923960
NodeRegistration: bootstrapv1.NodeRegistrationOptions{
924961
Name: "An old name", // This is a change
925962
},
@@ -931,7 +968,7 @@ func TestMatchesKubeadmConfig(t *testing.T) {
931968
g.Expect(err).ToNot(HaveOccurred())
932969
g.Expect(currentKubeadmConfig).ToNot(BeNil())
933970
g.Expect(desiredKubeadmConfig).ToNot(BeNil())
934-
g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
971+
g.Expect(desiredKubeadmConfig.Spec.InitConfiguration).To(Equal(bootstrapv1.InitConfiguration{})) // Verify that this is a join.
935972
g.Expect(match).To(BeFalse())
936973
g.Expect(reason).To(BeComparableTo(`Machine KubeadmConfig is outdated: diff: &v1beta2.KubeadmConfigSpec{
937974
ClusterConfiguration: {},
@@ -988,6 +1025,12 @@ func TestMatchesKubeadmConfig(t *testing.T) {
9881025
},
9891026
Spec: bootstrapv1.KubeadmConfigSpec{
9901027
JoinConfiguration: bootstrapv1.JoinConfiguration{
1028+
// This field is technically set by CABPK, but adding it here so that matchesKubeadmConfig detects this correctly as a join KubeadmConfig.
1029+
Discovery: bootstrapv1.Discovery{
1030+
BootstrapToken: bootstrapv1.BootstrapTokenDiscovery{
1031+
APIServerEndpoint: "1.2.3.4:6443",
1032+
},
1033+
},
9911034
NodeRegistration: bootstrapv1.NodeRegistrationOptions{
9921035
Name: "An old name", // This is a change
9931036
},
@@ -1071,6 +1114,12 @@ func TestMatchesKubeadmConfig(t *testing.T) {
10711114
ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
10721115
InitConfiguration: bootstrapv1.InitConfiguration{},
10731116
JoinConfiguration: bootstrapv1.JoinConfiguration{
1117+
// This field is technically set by CABPK, but adding it here so that matchesKubeadmConfig detects this correctly as a join KubeadmConfig.
1118+
Discovery: bootstrapv1.Discovery{
1119+
BootstrapToken: bootstrapv1.BootstrapTokenDiscovery{
1120+
APIServerEndpoint: "1.2.3.4:6443",
1121+
},
1122+
},
10741123
NodeRegistration: bootstrapv1.NodeRegistrationOptions{
10751124
Name: "name",
10761125
},
@@ -1082,7 +1131,7 @@ func TestMatchesKubeadmConfig(t *testing.T) {
10821131
g.Expect(err).ToNot(HaveOccurred())
10831132
g.Expect(currentKubeadmConfig).ToNot(BeNil())
10841133
g.Expect(desiredKubeadmConfig).ToNot(BeNil())
1085-
g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
1134+
g.Expect(desiredKubeadmConfig.Spec.InitConfiguration).To(Equal(bootstrapv1.InitConfiguration{})) // Verify that this is a join.
10861135
g.Expect(match).To(BeTrue())
10871136
g.Expect(reason).To(BeEmpty())
10881137
})
@@ -1125,6 +1174,12 @@ func TestMatchesKubeadmConfig(t *testing.T) {
11251174
Spec: bootstrapv1.KubeadmConfigSpec{
11261175
Format: "",
11271176
JoinConfiguration: bootstrapv1.JoinConfiguration{
1177+
// This field is technically set by CABPK, but adding it here so that matchesKubeadmConfig detects this correctly as a join KubeadmConfig.
1178+
Discovery: bootstrapv1.Discovery{
1179+
BootstrapToken: bootstrapv1.BootstrapTokenDiscovery{
1180+
APIServerEndpoint: "1.2.3.4:6443",
1181+
},
1182+
},
11281183
NodeRegistration: bootstrapv1.NodeRegistrationOptions{
11291184
Name: "name",
11301185
},
@@ -1136,7 +1191,7 @@ func TestMatchesKubeadmConfig(t *testing.T) {
11361191
g.Expect(err).ToNot(HaveOccurred())
11371192
g.Expect(currentKubeadmConfig).ToNot(BeNil())
11381193
g.Expect(desiredKubeadmConfig).ToNot(BeNil())
1139-
g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
1194+
g.Expect(desiredKubeadmConfig.Spec.InitConfiguration).To(Equal(bootstrapv1.InitConfiguration{})) // Verify that this is a join.
11401195
g.Expect(match).To(BeTrue())
11411196
g.Expect(reason).To(BeEmpty())
11421197
})
@@ -1180,6 +1235,12 @@ func TestMatchesKubeadmConfig(t *testing.T) {
11801235
},
11811236
Spec: bootstrapv1.KubeadmConfigSpec{
11821237
JoinConfiguration: bootstrapv1.JoinConfiguration{
1238+
// This field is technically set by CABPK, but adding it here so that matchesKubeadmConfig detects this correctly as a join KubeadmConfig.
1239+
Discovery: bootstrapv1.Discovery{
1240+
BootstrapToken: bootstrapv1.BootstrapTokenDiscovery{
1241+
APIServerEndpoint: "1.2.3.4:6443",
1242+
},
1243+
},
11831244
NodeRegistration: bootstrapv1.NodeRegistrationOptions{
11841245
Name: "name",
11851246
},
@@ -1191,7 +1252,7 @@ func TestMatchesKubeadmConfig(t *testing.T) {
11911252
g.Expect(err).ToNot(HaveOccurred())
11921253
g.Expect(currentKubeadmConfig).ToNot(BeNil())
11931254
g.Expect(desiredKubeadmConfig).ToNot(BeNil())
1194-
g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
1255+
g.Expect(desiredKubeadmConfig.Spec.InitConfiguration).To(Equal(bootstrapv1.InitConfiguration{})) // Verify that this is a join.
11951256
g.Expect(match).To(BeFalse())
11961257
g.Expect(reason).To(BeComparableTo(`Machine KubeadmConfig is outdated: diff: &v1beta2.KubeadmConfigSpec{
11971258
ClusterConfiguration: {},

test/e2e/data/infrastructure-docker/v1.10/clusterclass-quick-start.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,7 @@ spec:
554554
apiServer:
555555
extraArgs:
556556
v: "0"
557+
timeoutForControlPlane: 4m
557558
# host.docker.internal is required by kubetest when running on MacOS because of the way ports are proxied.
558559
certSANs: [localhost, host.docker.internal, "::", "::1", "127.0.0.1", "0.0.0.0"]
559560
initConfiguration:

test/e2e/data/infrastructure-docker/v1.9/clusterclass-quick-start.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,7 @@ spec:
554554
apiServer:
555555
extraArgs:
556556
v: "0"
557+
timeoutForControlPlane: 4m
557558
# host.docker.internal is required by kubetest when running on MacOS because of the way ports are proxied.
558559
certSANs: [localhost, host.docker.internal, "::", "::1", "127.0.0.1", "0.0.0.0"]
559560
initConfiguration:

0 commit comments

Comments
 (0)