Skip to content

Commit

Permalink
route: Check for routes only if the component is managed (PROJQUAY-6007)
Browse files Browse the repository at this point in the history
Signed-off-by: harishsurf <hgovinda@redhat.com>
  • Loading branch information
harishsurf committed Oct 27, 2023
1 parent ebae72f commit 3355d81
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions controllers/quay/quayregistry_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,15 +497,18 @@ func (r *QuayRegistryReconciler) Reconcile(ctx context.Context, req ctrl.Request
)
}

if err := r.checkRoutesAvailable(ctx, quayContext, updatedQuay, cbundle); err != nil {
return r.reconcileWithCondition(
ctx,
&quay,
v1.ConditionTypeRolloutBlocked,
metav1.ConditionTrue,
v1.ConditionReasonRouteComponentDependencyError,
fmt.Sprintf("could not check for `Routes` API: %s", err),
)
routeManaged := v1.ComponentIsManaged(updatedQuay.Spec.Components, v1.ComponentRoute)
if !routeManaged {
if err := r.checkRoutesAvailable(ctx, quayContext, updatedQuay, cbundle); err != nil {
return r.reconcileWithCondition(
ctx,
&quay,
v1.ConditionTypeRolloutBlocked,
metav1.ConditionTrue,
v1.ConditionReasonRouteComponentDependencyError,
fmt.Sprintf("could not check for `Routes` API: %s", err),
)
}
}

osmanaged := v1.ComponentIsManaged(updatedQuay.Spec.Components, v1.ComponentObjectStorage)
Expand Down

0 comments on commit 3355d81

Please sign in to comment.