Skip to content

Commit

Permalink
Remove double string from Receiver ready condition
Browse files Browse the repository at this point in the history
Signed-off-by: Hidde Beydals <[email protected]>
  • Loading branch information
hiddeco committed Nov 18, 2021
1 parent 7f66d39 commit 5767e3d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions controllers/receiver_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ func (r *ReceiverReconciler) Reconcile(ctx context.Context, req ctrl.Request) (r
return ctrl.Result{}, client.IgnoreNotFound(err)
}

// record suspension metrics
// Record suspension metrics
defer r.RecordSuspend(ctx, receiver, receiver.Spec.Suspend)
// return early if the object is suspended
// Return early if the object is suspended
if receiver.Spec.Suspend {
log.Info("Reconciliation is suspended for this object")
return ctrl.Result{}, nil
Expand Down Expand Up @@ -155,8 +155,7 @@ func (r *ReceiverReconciler) reconcile(ctx context.Context, obj *v1beta1.Receive
receiverURL := fmt.Sprintf("/hook/%s", sha256sum(token+obj.Name+obj.Namespace))

// Mark the resource as ready and set the URL
conditions.MarkTrue(obj, meta.ReadyCondition, v1beta1.InitializedReason, "Receiver initialised with URL: "+receiverURL,
receiverURL)
conditions.MarkTrue(obj, meta.ReadyCondition, v1beta1.InitializedReason, "Receiver initialized with URL: %s", receiverURL)
obj.Status.URL = receiverURL

ctrl.LoggerFrom(ctx).Info("Receiver initialized")
Expand Down

0 comments on commit 5767e3d

Please sign in to comment.