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 b5881fb commit 2b32040
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 15 deletions.
4 changes: 1 addition & 3 deletions internal/controller/bucket_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,7 @@ func (r *BucketReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res
}
result, retErr = summarizeHelper.SummarizeAndPatch(ctx, obj, summarizeOpts...)

// 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
4 changes: 1 addition & 3 deletions internal/controller/gitrepository_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,7 @@ func (r *GitRepositoryReconciler) Reconcile(ctx context.Context, req ctrl.Reques
}
result, retErr = summarizeHelper.SummarizeAndPatch(ctx, obj, summarizeOpts...)

// 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
4 changes: 1 addition & 3 deletions internal/controller/helmchart_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,7 @@ func (r *HelmChartReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
}
result, retErr = summarizeHelper.SummarizeAndPatch(ctx, obj, summarizeOpts...)

// 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
4 changes: 1 addition & 3 deletions internal/controller/helmrepository_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,7 @@ func (r *HelmRepositoryReconciler) Reconcile(ctx context.Context, req ctrl.Reque
}
result, retErr = summarizeHelper.SummarizeAndPatch(ctx, obj, summarizeOpts...)

// 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
4 changes: 1 addition & 3 deletions internal/controller/ocirepository_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,7 @@ func (r *OCIRepositoryReconciler) Reconcile(ctx context.Context, req ctrl.Reques
}
result, retErr = summarizeHelper.SummarizeAndPatch(ctx, obj, summarizeOpts...)

// 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 2b32040

Please sign in to comment.