@@ -187,10 +187,10 @@ func (r *IBMPowerVSImageReconciler) reconcile(ctx context.Context, cluster *infr
187187 Reason : infrav1 .ImageImportFailedReason ,
188188 })
189189 return ctrl.Result {RequeueAfter : 2 * time .Minute }, fmt .Errorf ("failed to import image, message: %s" , job .Status .Message )
190- case infrav1 .PowerVSImageStateQue :
190+ case infrav1 .PowerVSImageStateQueued :
191191 imageScope .SetNotReady ()
192- imageScope .SetImageState (string (infrav1 .PowerVSImageStateQue ))
193- v1beta1conditions .MarkFalse (imageScope .IBMPowerVSImage , infrav1 .ImageImportedCondition , string (infrav1 .PowerVSImageStateQue ), clusterv1beta1 .ConditionSeverityInfo , "%s" , job .Status .Message )
192+ imageScope .SetImageState (string (infrav1 .PowerVSImageStateQueued ))
193+ v1beta1conditions .MarkFalse (imageScope .IBMPowerVSImage , infrav1 .ImageImportedCondition , string (infrav1 .PowerVSImageStateQueued ), clusterv1beta1 .ConditionSeverityInfo , "%s" , job .Status .Message )
194194 v1beta2conditions .Set (imageScope .IBMPowerVSImage , metav1.Condition {
195195 Type : infrav1 .IBMPowerVSImageReadyV1Beta2Condition ,
196196 Status : metav1 .ConditionFalse ,
@@ -237,7 +237,7 @@ func reconcileImage(ctx context.Context, img *models.ImageReference, imageScope
237237 log .Info ("ImageState" , image .State )
238238
239239 switch imageScope .GetImageState () {
240- case infrav1 .PowerVSImageStateQue :
240+ case infrav1 .PowerVSImageStateQueued :
241241 log .Info ("Image is in queued state" )
242242 imageScope .SetNotReady ()
243243 v1beta1conditions .MarkFalse (imageScope .IBMPowerVSImage , infrav1 .ImageReadyCondition , infrav1 .ImageNotReadyReason , clusterv1beta1 .ConditionSeverityWarning , "" )
@@ -342,25 +342,6 @@ func (r *IBMPowerVSImageReconciler) SetupWithManager(mgr ctrl.Manager) error {
342342}
343343
344344func patchIBMPowerVSImage (ctx context.Context , patchHelper * v1beta1patch.Helper , ibmPowerVSImage * infrav1.IBMPowerVSImage ) error {
345- // Before computing ready condition, make sure that ImageReady is always set.
346- // NOTE: This is required because v1beta2 conditions comply to guideline requiring conditions to be set at the
347- // first reconcile.
348- if c := v1beta2conditions .Get (ibmPowerVSImage , infrav1 .IBMPowerVSImageReadyV1Beta2Condition ); c == nil {
349- if ibmPowerVSImage .Status .Ready {
350- v1beta2conditions .Set (ibmPowerVSImage , metav1.Condition {
351- Type : infrav1 .IBMPowerVSImageReadyV1Beta2Condition ,
352- Status : metav1 .ConditionTrue ,
353- Reason : infrav1 .IBMPowerVSImageReadyV1Beta2Reason ,
354- })
355- } else {
356- v1beta2conditions .Set (ibmPowerVSImage , metav1.Condition {
357- Type : infrav1 .IBMPowerVSImageReadyV1Beta2Condition ,
358- Status : metav1 .ConditionFalse ,
359- Reason : infrav1 .IBMPowerVSImageNotReadyV1Beta2Reason ,
360- })
361- }
362- }
363-
364345 // always update the readyCondition.
365346 v1beta1conditions .SetSummary (ibmPowerVSImage ,
366347 v1beta1conditions .WithConditions (
0 commit comments