@@ -242,8 +242,7 @@ func (r *MachineBackendReconciler) reconcileNormalCloudMachine(ctx context.Conte
242
242
243
243
func (r * MachineBackendReconciler ) reconcileNormalNode (ctx context.Context , cluster * clusterv1.Cluster , machine * clusterv1.Machine , inMemoryMachine * infrav1.DevMachine ) (_ ctrl.Result , retErr error ) {
244
244
// No-op if the VM is not provisioned yet
245
- // TODO (v1beta2): test for v1beta2 conditions
246
- if ! v1beta1conditions .IsTrue (inMemoryMachine , infrav1 .VMProvisionedCondition ) {
245
+ if ! conditions .IsTrue (inMemoryMachine , infrav1 .DevMachineInMemoryVMProvisionedCondition ) {
247
246
conditions .Set (inMemoryMachine , metav1.Condition {
248
247
Type : infrav1 .DevMachineInMemoryNodeProvisionedCondition ,
249
248
Status : metav1 .ConditionFalse ,
@@ -280,8 +279,7 @@ func (r *MachineBackendReconciler) reconcileNormalNode(ctx context.Context, clus
280
279
}
281
280
}
282
281
283
- // TODO (v1beta2): test for v1beta2 conditions
284
- start := v1beta1conditions .Get (inMemoryMachine , infrav1 .VMProvisionedCondition ).LastTransitionTime
282
+ start := conditions .Get (inMemoryMachine , infrav1 .DevMachineInMemoryVMProvisionedCondition ).LastTransitionTime
285
283
now := time .Now ()
286
284
if now .Before (start .Add (provisioningDuration )) {
287
285
v1beta1conditions .MarkFalse (inMemoryMachine , infrav1 .NodeProvisionedCondition , infrav1 .NodeWaitingForStartupTimeoutReason , clusterv1 .ConditionSeverityInfo , "" )
@@ -374,8 +372,7 @@ func (r *MachineBackendReconciler) reconcileNormalETCD(ctx context.Context, clus
374
372
}
375
373
376
374
// No-op if the VM is not provisioned yet
377
- // TODO (v1beta2): test for v1beta2 conditions
378
- if ! v1beta1conditions .IsTrue (inMemoryMachine , infrav1 .VMProvisionedCondition ) {
375
+ if ! conditions .IsTrue (inMemoryMachine , infrav1 .DevMachineInMemoryVMProvisionedCondition ) {
379
376
conditions .Set (inMemoryMachine , metav1.Condition {
380
377
Type : infrav1 .DevMachineInMemoryEtcdProvisionedCondition ,
381
378
Status : metav1 .ConditionFalse ,
@@ -385,8 +382,7 @@ func (r *MachineBackendReconciler) reconcileNormalETCD(ctx context.Context, clus
385
382
}
386
383
387
384
// No-op if the Node is not provisioned yet
388
- // TODO (v1beta2): test for v1beta2 conditions
389
- if ! v1beta1conditions .IsTrue (inMemoryMachine , infrav1 .NodeProvisionedCondition ) {
385
+ if ! conditions .IsTrue (inMemoryMachine , infrav1 .DevMachineInMemoryNodeProvisionedCondition ) {
390
386
conditions .Set (inMemoryMachine , metav1.Condition {
391
387
Type : infrav1 .DevMachineInMemoryEtcdProvisionedCondition ,
392
388
Status : metav1 .ConditionFalse ,
@@ -423,8 +419,7 @@ func (r *MachineBackendReconciler) reconcileNormalETCD(ctx context.Context, clus
423
419
}
424
420
}
425
421
426
- // TODO (v1beta2): test for v1beta2 conditions
427
- start := v1beta1conditions .Get (inMemoryMachine , infrav1 .NodeProvisionedCondition ).LastTransitionTime
422
+ start := conditions .Get (inMemoryMachine , infrav1 .DevMachineInMemoryNodeProvisionedCondition ).LastTransitionTime
428
423
now := time .Now ()
429
424
if now .Before (start .Add (provisioningDuration )) {
430
425
v1beta1conditions .MarkFalse (inMemoryMachine , infrav1 .EtcdProvisionedCondition , infrav1 .EtcdWaitingForStartupTimeoutReason , clusterv1 .ConditionSeverityInfo , "" )
@@ -618,8 +613,7 @@ func (r *MachineBackendReconciler) reconcileNormalAPIServer(ctx context.Context,
618
613
}
619
614
620
615
// No-op if the VM is not provisioned yet
621
- // TODO (v1beta2): test for v1beta2 conditions
622
- if ! v1beta1conditions .IsTrue (inMemoryMachine , infrav1 .VMProvisionedCondition ) {
616
+ if ! conditions .IsTrue (inMemoryMachine , infrav1 .DevMachineInMemoryVMProvisionedCondition ) {
623
617
conditions .Set (inMemoryMachine , metav1.Condition {
624
618
Type : infrav1 .DevMachineInMemoryAPIServerProvisionedCondition ,
625
619
Status : metav1 .ConditionFalse ,
@@ -629,8 +623,7 @@ func (r *MachineBackendReconciler) reconcileNormalAPIServer(ctx context.Context,
629
623
}
630
624
631
625
// No-op if the Node is not provisioned yet
632
- // TODO (v1beta2): test for v1beta2 conditions
633
- if ! v1beta1conditions .IsTrue (inMemoryMachine , infrav1 .NodeProvisionedCondition ) {
626
+ if ! conditions .IsTrue (inMemoryMachine , infrav1 .DevMachineInMemoryNodeProvisionedCondition ) {
634
627
conditions .Set (inMemoryMachine , metav1.Condition {
635
628
Type : infrav1 .DevMachineInMemoryAPIServerProvisionedCondition ,
636
629
Status : metav1 .ConditionFalse ,
@@ -667,8 +660,7 @@ func (r *MachineBackendReconciler) reconcileNormalAPIServer(ctx context.Context,
667
660
}
668
661
}
669
662
670
- // TODO (v1beta2): test for v1beta2 conditions
671
- start := v1beta1conditions .Get (inMemoryMachine , infrav1 .NodeProvisionedCondition ).LastTransitionTime
663
+ start := conditions .Get (inMemoryMachine , infrav1 .DevMachineInMemoryNodeProvisionedCondition ).LastTransitionTime
672
664
now := time .Now ()
673
665
if now .Before (start .Add (provisioningDuration )) {
674
666
v1beta1conditions .MarkFalse (inMemoryMachine , infrav1 .APIServerProvisionedCondition , infrav1 .APIServerWaitingForStartupTimeoutReason , clusterv1 .ConditionSeverityInfo , "" )
@@ -775,8 +767,7 @@ func (r *MachineBackendReconciler) reconcileNormalScheduler(ctx context.Context,
775
767
// specific behaviour for this component because they are not relevant for stress tests.
776
768
// As a current approximation, we create the scheduler as soon as the API server is provisioned;
777
769
// also, the scheduler is immediately marked as ready.
778
- // TODO (v1beta2): test for v1beta2 conditions
779
- if ! v1beta1conditions .IsTrue (inMemoryMachine , infrav1 .APIServerProvisionedCondition ) {
770
+ if ! conditions .IsTrue (inMemoryMachine , infrav1 .DevMachineInMemoryAPIServerProvisionedCondition ) {
780
771
return ctrl.Result {}, nil
781
772
}
782
773
@@ -823,8 +814,7 @@ func (r *MachineBackendReconciler) reconcileNormalControllerManager(ctx context.
823
814
// specific behaviour for this component because they are not relevant for stress tests.
824
815
// As a current approximation, we create the controller manager as soon as the API server is provisioned;
825
816
// also, the controller manager is immediately marked as ready.
826
- // TODO (v1beta2): test for v1beta2 conditions
827
- if ! v1beta1conditions .IsTrue (inMemoryMachine , infrav1 .APIServerProvisionedCondition ) {
817
+ if ! conditions .IsTrue (inMemoryMachine , infrav1 .DevMachineInMemoryAPIServerProvisionedCondition ) {
828
818
return ctrl.Result {}, nil
829
819
}
830
820
0 commit comments