Skip to content

Commit

Permalink
Merge pull request #930 from carlkyrillos/THREESCALE-10754
Browse files Browse the repository at this point in the history
THREESCALE-10754 Fix APIManager status to reconcile until Available
  • Loading branch information
carlkyrillos authored Feb 26, 2024
2 parents 6efcb5a + e6f2ccd commit ff9c616
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion controllers/apps/apimanager_status_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,16 @@ func (s *APIManagerStatusReconciler) Reconcile() (reconcile.Result, error) {
return reconcile.Result{}, fmt.Errorf("failed to calculate status: %w", err)
}

apiManagerAvailable := false
for _, s := range s.apimanagerResource.Status.Conditions {
if s.Type == appsv1alpha1.APIManagerAvailableConditionType && s.IsTrue() {
apiManagerAvailable = true
}
}

equalStatus := s.apimanagerResource.Status.Equals(newStatus, s.logger)
s.logger.V(1).Info("Status", "status is different", !equalStatus)
if equalStatus {
if equalStatus && apiManagerAvailable {
// Steady state
s.logger.V(1).Info("Status was not updated")
return reconcile.Result{}, nil
Expand Down

0 comments on commit ff9c616

Please sign in to comment.