From c035da3b654479141cad4ec94d83b1ae6d0f7b1a Mon Sep 17 00:00:00 2001 From: hasithsen Date: Thu, 12 Dec 2024 00:51:58 +0530 Subject: [PATCH] feat: Remove deprecated object metrics from controllers fluxcd/flux2#5083 Signed-off-by: hasithsen --- internal/controller/imagepolicy_controller.go | 3 +-- internal/controller/imagerepository_controller.go | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/internal/controller/imagepolicy_controller.go b/internal/controller/imagepolicy_controller.go index 4258a322..3d6c4649 100644 --- a/internal/controller/imagepolicy_controller.go +++ b/internal/controller/imagepolicy_controller.go @@ -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) }() diff --git a/internal/controller/imagerepository_controller.go b/internal/controller/imagerepository_controller.go index fcfce737..0ea9ec30 100644 --- a/internal/controller/imagerepository_controller.go +++ b/internal/controller/imagerepository_controller.go @@ -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) }()