Skip to content

Commit

Permalink
Fix CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
harishsurf committed Nov 14, 2023
1 parent eb41bef commit 9084d5f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
5 changes: 5 additions & 0 deletions controllers/quay/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ func (r *QuayRegistryReconciler) checkRoutesAvailable(
quay *v1.QuayRegistry,
bundle *corev1.Secret,
) error {
routeManaged := v1.ComponentIsManaged(quay.Spec.Components, v1.ComponentRoute)
tlsManaged := v1.ComponentIsManaged(quay.Spec.Components, v1.ComponentTLS)
if routeManaged || tlsManaged {
return nil
}
// NOTE: The `route` component is unique because we allow users to set the
// `SERVER_HOSTNAME` field instead of controlling the entire fieldgroup. This
// value is then passed to the created `Route` using a Kustomize variable.
Expand Down
22 changes: 9 additions & 13 deletions controllers/quay/quayregistry_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,19 +497,15 @@ func (r *QuayRegistryReconciler) Reconcile(ctx context.Context, req ctrl.Request
)
}

routeManaged := v1.ComponentIsManaged(updatedQuay.Spec.Components, v1.ComponentRoute)
tlsManaged := v1.ComponentIsManaged(updatedQuay.Spec.Components, v1.ComponentTLS)
if routeManaged || tlsManaged {
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),
)
}
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 9084d5f

Please sign in to comment.