Skip to content

Commit

Permalink
Change Eventing CR status to WARN if cannot connect to NATS
Browse files Browse the repository at this point in the history
  • Loading branch information
marcobebway committed Feb 5, 2024
1 parent e980a57 commit da14f04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/controller/operator/eventing/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,11 +575,11 @@ func (r *Reconciler) reconcileNATSBackend(ctx context.Context,
if connErr := r.connectToNATS(eventingCR); connErr != nil {
if errors.Is(connErr, natsconnectionerrors.ErrCannotConnect) {
return kctrl.Result{}, reconcile.TerminalError(
r.syncStatusWithNATSErr(ctx, eventingCR, connErr, log),
r.syncStatusWithNATSState(ctx, operatorv1alpha1.StateWarning, eventingCR, connErr, log),
)
}

return kctrl.Result{}, r.syncStatusWithNATSErr(ctx, eventingCR, connErr, log)
return kctrl.Result{}, r.syncStatusWithNATSState(ctx, operatorv1alpha1.StateWarning, eventingCR, connErr, log)
}

// set NATSAvailable condition to true and update status
Expand Down

0 comments on commit da14f04

Please sign in to comment.