Skip to content

Commit

Permalink
feat: Remove deprecated object metrics from controllers fluxcd/flux2#…
Browse files Browse the repository at this point in the history
…5083

Signed-off-by: hasithsen <[email protected]>
  • Loading branch information
hasithsen committed Dec 11, 2024
1 parent f335100 commit 43685d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions internal/controller/imagepolicy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ func (r *ImagePolicyReconciler) Reconcile(ctx context.Context, req ctrl.Request)
retErr = kerrors.NewAggregate([]error{retErr, err})
}

// Always record readiness and duration metrics.
r.Metrics.RecordReadiness(ctx, obj)
// Always record duration metrics.
r.Metrics.RecordDuration(ctx, obj, start)
}()

Expand Down
4 changes: 1 addition & 3 deletions internal/controller/imagerepository_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,7 @@ func (r *ImageRepositoryReconciler) Reconcile(ctx context.Context, req ctrl.Requ
retErr = kerrors.NewAggregate([]error{retErr, err})
}

// Always record suspend, readiness and duration metrics.
r.Metrics.RecordSuspend(ctx, obj, obj.Spec.Suspend)
r.Metrics.RecordReadiness(ctx, obj)
// Always record duration metrics.
r.Metrics.RecordDuration(ctx, obj, start)
}()

Expand Down

0 comments on commit 43685d0

Please sign in to comment.