Skip to content

Commit

Permalink
added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mfaizanse committed Nov 13, 2023
1 parent 1c63ae2 commit f190a55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/controller/eventing/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,11 @@ func (r *Reconciler) reconcileNATSBackend(ctx context.Context, eventing *eventin
_, err := r.kubeClient.GetCRD(ctx, k8s.NatsGVK.GroupResource().String())
if err != nil {
if apierrors.IsNotFound(err) {
// delete the publisher proxy resources, because the publisher deployment will go
// into CrashLoopBackOff.
log.Infof("NATS module not enabled, deleting publisher proxy resources")
delErr := r.eventingManager.DeletePublisherProxyResources(ctx, eventing)
// update the Eventing CR status.
notFoundErr := fmt.Errorf("NATS module has to be installed: %v", err)
return ctrl.Result{}, errors.Join(r.syncStatusWithNATSErr(ctx, eventing, notFoundErr, log), delErr)
}
Expand Down

0 comments on commit f190a55

Please sign in to comment.