@@ -276,9 +276,9 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
276276 chrt , values , err := r .Handler .Handle (ctx , bundleFS , ext )
277277 if err != nil {
278278 apimeta .SetStatusCondition (& ext .Status .Conditions , metav1.Condition {
279- Type : rukpakv1alpha2 .TypeInstalled ,
279+ Type : ocv1alpha1 .TypeInstalled ,
280280 Status : metav1 .ConditionFalse ,
281- Reason : rukpakv1alpha2 . ReasonInstallFailed ,
281+ Reason : ocv1alpha1 . ReasonInstallationFailed ,
282282 Message : err .Error (),
283283 })
284284 return ctrl.Result {}, err
@@ -303,7 +303,7 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
303303
304304 rel , state , err := r .getReleaseState (ac , ext , chrt , values , post )
305305 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 )
307307 return ctrl.Result {}, err
308308 }
309309
@@ -318,7 +318,7 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
318318 if isResourceNotFoundErr (err ) {
319319 err = errRequiredResourceNotFound {err }
320320 }
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 )
322322 return ctrl.Result {}, err
323323 }
324324 case stateNeedsUpgrade :
@@ -327,15 +327,15 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
327327 if isResourceNotFoundErr (err ) {
328328 err = errRequiredResourceNotFound {err }
329329 }
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 )
331331 return ctrl.Result {}, err
332332 }
333333 case stateUnchanged :
334334 if err := ac .Reconcile (rel ); err != nil {
335335 if isResourceNotFoundErr (err ) {
336336 err = errRequiredResourceNotFound {err }
337337 }
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 )
339339 return ctrl.Result {}, err
340340 }
341341 default :
@@ -344,14 +344,14 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
344344
345345 relObjects , err := util .ManifestObjects (strings .NewReader (rel .Manifest ), fmt .Sprintf ("%s-release-manifest" , rel .Name ))
346346 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 )
348348 return ctrl.Result {}, err
349349 }
350350
351351 for _ , obj := range relObjects {
352352 uMap , err := runtime .DefaultUnstructuredConverter .ToUnstructured (obj )
353353 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 )
355355 return ctrl.Result {}, err
356356 }
357357
@@ -373,7 +373,7 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
373373 return nil
374374 }(); err != nil {
375375 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 )
377377 return ctrl.Result {}, err
378378 }
379379 }
@@ -844,4 +844,4 @@ func bundleMetadataFor(bundle *catalogmetadata.Bundle) *ocv1alpha1.BundleMetadat
844844 Name : bundle .Name ,
845845 Version : ver .String (),
846846 }
847- }
847+ }
0 commit comments