@@ -187,10 +187,10 @@ func (r *IBMPowerVSImageReconciler) reconcile(ctx context.Context, cluster *infr
187
187
Reason : infrav1 .ImageImportFailedReason ,
188
188
})
189
189
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 :
191
191
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 )
194
194
v1beta2conditions .Set (imageScope .IBMPowerVSImage , metav1.Condition {
195
195
Type : infrav1 .IBMPowerVSImageReadyV1Beta2Condition ,
196
196
Status : metav1 .ConditionFalse ,
@@ -237,7 +237,7 @@ func reconcileImage(ctx context.Context, img *models.ImageReference, imageScope
237
237
log .Info ("ImageState" , image .State )
238
238
239
239
switch imageScope .GetImageState () {
240
- case infrav1 .PowerVSImageStateQue :
240
+ case infrav1 .PowerVSImageStateQueued :
241
241
log .Info ("Image is in queued state" )
242
242
imageScope .SetNotReady ()
243
243
v1beta1conditions .MarkFalse (imageScope .IBMPowerVSImage , infrav1 .ImageReadyCondition , infrav1 .ImageNotReadyReason , clusterv1beta1 .ConditionSeverityWarning , "" )
@@ -342,25 +342,6 @@ func (r *IBMPowerVSImageReconciler) SetupWithManager(mgr ctrl.Manager) error {
342
342
}
343
343
344
344
func 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
-
364
345
// always update the readyCondition.
365
346
v1beta1conditions .SetSummary (ibmPowerVSImage ,
366
347
v1beta1conditions .WithConditions (
0 commit comments