@@ -242,8 +242,7 @@ func (r *MachineBackendReconciler) reconcileNormalCloudMachine(ctx context.Conte
242242
243243func (r * MachineBackendReconciler ) reconcileNormalNode (ctx context.Context , cluster * clusterv1.Cluster , machine * clusterv1.Machine , inMemoryMachine * infrav1.DevMachine ) (_ ctrl.Result , retErr error ) {
244244 // 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 ) {
247246 conditions .Set (inMemoryMachine , metav1.Condition {
248247 Type : infrav1 .DevMachineInMemoryNodeProvisionedCondition ,
249248 Status : metav1 .ConditionFalse ,
@@ -280,8 +279,7 @@ func (r *MachineBackendReconciler) reconcileNormalNode(ctx context.Context, clus
280279 }
281280 }
282281
283- // TODO (v1beta2): test for v1beta2 conditions
284- start := v1beta1conditions .Get (inMemoryMachine , infrav1 .VMProvisionedCondition ).LastTransitionTime
282+ start := conditions .Get (inMemoryMachine , infrav1 .DevMachineInMemoryVMProvisionedCondition ).LastTransitionTime
285283 now := time .Now ()
286284 if now .Before (start .Add (provisioningDuration )) {
287285 v1beta1conditions .MarkFalse (inMemoryMachine , infrav1 .NodeProvisionedCondition , infrav1 .NodeWaitingForStartupTimeoutReason , clusterv1 .ConditionSeverityInfo , "" )
@@ -374,8 +372,7 @@ func (r *MachineBackendReconciler) reconcileNormalETCD(ctx context.Context, clus
374372 }
375373
376374 // 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 ) {
379376 conditions .Set (inMemoryMachine , metav1.Condition {
380377 Type : infrav1 .DevMachineInMemoryEtcdProvisionedCondition ,
381378 Status : metav1 .ConditionFalse ,
@@ -385,8 +382,7 @@ func (r *MachineBackendReconciler) reconcileNormalETCD(ctx context.Context, clus
385382 }
386383
387384 // 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 ) {
390386 conditions .Set (inMemoryMachine , metav1.Condition {
391387 Type : infrav1 .DevMachineInMemoryEtcdProvisionedCondition ,
392388 Status : metav1 .ConditionFalse ,
@@ -423,8 +419,7 @@ func (r *MachineBackendReconciler) reconcileNormalETCD(ctx context.Context, clus
423419 }
424420 }
425421
426- // TODO (v1beta2): test for v1beta2 conditions
427- start := v1beta1conditions .Get (inMemoryMachine , infrav1 .NodeProvisionedCondition ).LastTransitionTime
422+ start := conditions .Get (inMemoryMachine , infrav1 .DevMachineInMemoryNodeProvisionedCondition ).LastTransitionTime
428423 now := time .Now ()
429424 if now .Before (start .Add (provisioningDuration )) {
430425 v1beta1conditions .MarkFalse (inMemoryMachine , infrav1 .EtcdProvisionedCondition , infrav1 .EtcdWaitingForStartupTimeoutReason , clusterv1 .ConditionSeverityInfo , "" )
@@ -618,8 +613,7 @@ func (r *MachineBackendReconciler) reconcileNormalAPIServer(ctx context.Context,
618613 }
619614
620615 // 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 ) {
623617 conditions .Set (inMemoryMachine , metav1.Condition {
624618 Type : infrav1 .DevMachineInMemoryAPIServerProvisionedCondition ,
625619 Status : metav1 .ConditionFalse ,
@@ -629,8 +623,7 @@ func (r *MachineBackendReconciler) reconcileNormalAPIServer(ctx context.Context,
629623 }
630624
631625 // 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 ) {
634627 conditions .Set (inMemoryMachine , metav1.Condition {
635628 Type : infrav1 .DevMachineInMemoryAPIServerProvisionedCondition ,
636629 Status : metav1 .ConditionFalse ,
@@ -667,8 +660,7 @@ func (r *MachineBackendReconciler) reconcileNormalAPIServer(ctx context.Context,
667660 }
668661 }
669662
670- // TODO (v1beta2): test for v1beta2 conditions
671- start := v1beta1conditions .Get (inMemoryMachine , infrav1 .NodeProvisionedCondition ).LastTransitionTime
663+ start := conditions .Get (inMemoryMachine , infrav1 .DevMachineInMemoryNodeProvisionedCondition ).LastTransitionTime
672664 now := time .Now ()
673665 if now .Before (start .Add (provisioningDuration )) {
674666 v1beta1conditions .MarkFalse (inMemoryMachine , infrav1 .APIServerProvisionedCondition , infrav1 .APIServerWaitingForStartupTimeoutReason , clusterv1 .ConditionSeverityInfo , "" )
@@ -775,8 +767,7 @@ func (r *MachineBackendReconciler) reconcileNormalScheduler(ctx context.Context,
775767 // specific behaviour for this component because they are not relevant for stress tests.
776768 // As a current approximation, we create the scheduler as soon as the API server is provisioned;
777769 // 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 ) {
780771 return ctrl.Result {}, nil
781772 }
782773
@@ -823,8 +814,7 @@ func (r *MachineBackendReconciler) reconcileNormalControllerManager(ctx context.
823814 // specific behaviour for this component because they are not relevant for stress tests.
824815 // As a current approximation, we create the controller manager as soon as the API server is provisioned;
825816 // 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 ) {
828818 return ctrl.Result {}, nil
829819 }
830820
0 commit comments