@@ -276,9 +276,9 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
276
276
chrt , values , err := r .Handler .Handle (ctx , bundleFS , ext )
277
277
if err != nil {
278
278
apimeta .SetStatusCondition (& ext .Status .Conditions , metav1.Condition {
279
- Type : rukpakv1alpha2 .TypeInstalled ,
279
+ Type : ocv1alpha1 .TypeInstalled ,
280
280
Status : metav1 .ConditionFalse ,
281
- Reason : rukpakv1alpha2 . ReasonInstallFailed ,
281
+ Reason : ocv1alpha1 . ReasonInstallationFailed ,
282
282
Message : err .Error (),
283
283
})
284
284
return ctrl.Result {}, err
@@ -303,7 +303,7 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
303
303
304
304
rel , state , err := r .getReleaseState (ac , ext , chrt , values , post )
305
305
if err != nil {
306
- setInstalledAndHealthyFalse (& ext .Status .Conditions , fmt .Sprintf ("%s:%v" , ocv1alpha1 .ReasonErrorGettingReleaseState , err ), ext .Generation )
306
+ setInstalledStatusConditionFailed (& ext .Status .Conditions , fmt .Sprintf ("%s:%v" , ocv1alpha1 .ReasonErrorGettingReleaseState , err ), ext .Generation )
307
307
return ctrl.Result {}, err
308
308
}
309
309
@@ -318,7 +318,7 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
318
318
if isResourceNotFoundErr (err ) {
319
319
err = errRequiredResourceNotFound {err }
320
320
}
321
- setInstalledAndHealthyFalse (& ext .Status .Conditions , fmt .Sprintf ("%s:%v" , ocv1alpha1 .ReasonInstallationFailed , err ), ext .Generation )
321
+ setInstalledStatusConditionFailed (& ext .Status .Conditions , fmt .Sprintf ("%s:%v" , ocv1alpha1 .ReasonInstallationFailed , err ), ext .Generation )
322
322
return ctrl.Result {}, err
323
323
}
324
324
case stateNeedsUpgrade :
@@ -327,15 +327,15 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
327
327
if isResourceNotFoundErr (err ) {
328
328
err = errRequiredResourceNotFound {err }
329
329
}
330
- setInstalledAndHealthyFalse (& ext .Status .Conditions , fmt .Sprintf ("%s:%v" , ocv1alpha1 .ReasonUpgradeFailed , err ), ext .Generation )
330
+ setInstalledStatusConditionFailed (& ext .Status .Conditions , fmt .Sprintf ("%s:%v" , ocv1alpha1 .ReasonUpgradeFailed , err ), ext .Generation )
331
331
return ctrl.Result {}, err
332
332
}
333
333
case stateUnchanged :
334
334
if err := ac .Reconcile (rel ); err != nil {
335
335
if isResourceNotFoundErr (err ) {
336
336
err = errRequiredResourceNotFound {err }
337
337
}
338
- setInstalledAndHealthyFalse (& ext .Status .Conditions , fmt .Sprintf ("%s:%v" , ocv1alpha1 .ReasonResolutionFailed , err ), ext .Generation )
338
+ setInstalledStatusConditionFailed (& ext .Status .Conditions , fmt .Sprintf ("%s:%v" , ocv1alpha1 .ReasonResolutionFailed , err ), ext .Generation )
339
339
return ctrl.Result {}, err
340
340
}
341
341
default :
@@ -344,14 +344,14 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
344
344
345
345
relObjects , err := util .ManifestObjects (strings .NewReader (rel .Manifest ), fmt .Sprintf ("%s-release-manifest" , rel .Name ))
346
346
if err != nil {
347
- setInstalledAndHealthyFalse (& ext .Status .Conditions , fmt .Sprintf ("%s:%v" , ocv1alpha1 .ReasonCreateDynamicWatchFailed , err ), ext .Generation )
347
+ setInstalledStatusConditionFailed (& ext .Status .Conditions , fmt .Sprintf ("%s:%v" , ocv1alpha1 .ReasonCreateDynamicWatchFailed , err ), ext .Generation )
348
348
return ctrl.Result {}, err
349
349
}
350
350
351
351
for _ , obj := range relObjects {
352
352
uMap , err := runtime .DefaultUnstructuredConverter .ToUnstructured (obj )
353
353
if err != nil {
354
- setInstalledAndHealthyFalse (& ext .Status .Conditions , fmt .Sprintf ("%s:%v" , ocv1alpha1 .ReasonCreateDynamicWatchFailed , err ), ext .Generation )
354
+ setInstalledStatusConditionFailed (& ext .Status .Conditions , fmt .Sprintf ("%s:%v" , ocv1alpha1 .ReasonCreateDynamicWatchFailed , err ), ext .Generation )
355
355
return ctrl.Result {}, err
356
356
}
357
357
@@ -373,7 +373,7 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
373
373
return nil
374
374
}(); err != nil {
375
375
ext .Status .InstalledBundle = nil
376
- setInstalledAndHealthyFalse (& ext .Status .Conditions , fmt .Sprintf ("%s:%v" , ocv1alpha1 .ReasonCreateDynamicWatchFailed , err ), ext .Generation )
376
+ setInstalledStatusConditionFailed (& ext .Status .Conditions , fmt .Sprintf ("%s:%v" , ocv1alpha1 .ReasonCreateDynamicWatchFailed , err ), ext .Generation )
377
377
return ctrl.Result {}, err
378
378
}
379
379
}
@@ -844,4 +844,4 @@ func bundleMetadataFor(bundle *catalogmetadata.Bundle) *ocv1alpha1.BundleMetadat
844
844
Name : bundle .Name ,
845
845
Version : ver .String (),
846
846
}
847
- }
847
+ }
0 commit comments