diff --git a/pkg/controllers/node/health/controller.go b/pkg/controllers/node/health/controller.go index 15c5ddc79c..32cdaff6b3 100644 --- a/pkg/controllers/node/health/controller.go +++ b/pkg/controllers/node/health/controller.go @@ -21,7 +21,6 @@ import ( "fmt" "time" - "github.com/prometheus/client_golang/prometheus" "github.com/samber/lo" corev1 "k8s.io/api/core/v1" "k8s.io/utils/clock" @@ -109,11 +108,11 @@ func (c *Controller) Reconcile(ctx context.Context, node *corev1.Node) (reconcil } // 4. The deletion timestamp has successfully been set for the Node, update relevant metrics. log.FromContext(ctx).V(1).Info("deleting unhealthy node") - metrics.NodeClaimsDisruptedTotal.With(prometheus.Labels{ + metrics.NodeClaimsDisruptedTotal.Inc(map[string]string{ metrics.ReasonLabel: metrics.UnhealthyReason, metrics.NodePoolLabel: nodeClaim.Labels[v1.NodePoolLabelKey], metrics.CapacityTypeLabel: nodeClaim.Labels[v1.CapacityTypeLabelKey], - }).Inc() + }) return reconcile.Result{}, nil }