@@ -16,7 +16,6 @@ import (
1616
1717 "github.com/bombsimon/logrusr/v2"
1818 workspacev1 "github.com/gitpod-io/gitpod/ws-manager/api/crd/v1"
19- "github.com/prometheus/client_golang/prometheus"
2019 "github.com/spf13/cobra"
2120 corev1 "k8s.io/api/core/v1"
2221 "k8s.io/apimachinery/pkg/api/errors"
@@ -146,8 +145,6 @@ var runCmd = &cobra.Command{
146145
147146 metrics .Registry .MustRegister (NodeLabelerCounterVec )
148147 metrics .Registry .MustRegister (NodeLabelerTimeHistVec )
149- metrics .Registry .MustRegister (NodeScaledownAnnotationReconcileDuration )
150- metrics .Registry .MustRegister (NodeScaledownAnnotationReconciliationQueueSize )
151148
152149 err = mgr .AddHealthzCheck ("healthz" , healthz .Ping )
153150 if err != nil {
@@ -328,6 +325,7 @@ func (c *NodeScaledownAnnotationController) periodicReconciliation() {
328325 log .WithError (err ).Error ("periodic reconciliation failed" )
329326 }
330327 case <- c .stopChan :
328+ log .Info ("stopping periodic full reconciliation" )
331329 return
332330 }
333331 }
@@ -394,7 +392,6 @@ func (c *NodeScaledownAnnotationController) queueNodeForReconciliation(nodeName
394392 default :
395393 log .WithField ("node" , nodeName ).Warn ("reconciliation queue full" )
396394 }
397- NodeScaledownAnnotationReconciliationQueueSize .Set (float64 (len (c .nodesToReconcile )))
398395}
399396
400397func (c * NodeScaledownAnnotationController ) Reconcile (ctx context.Context , req ctrl.Request ) (ctrl.Result , error ) {
@@ -422,9 +419,6 @@ func (wc *NodeScaledownAnnotationController) Stop() {
422419}
423420
424421func (c * NodeScaledownAnnotationController ) reconcileAllNodes (ctx context.Context ) (ctrl.Result , error ) {
425- timer := prometheus .NewTimer (NodeScaledownAnnotationReconcileDuration .WithLabelValues ("all_nodes" ))
426- defer timer .ObserveDuration ()
427-
428422 var nodes corev1.NodeList
429423 if err := c .List (ctx , & nodes ); err != nil {
430424 log .WithError (err ).Error ("failed to list nodes" )
@@ -439,9 +433,6 @@ func (c *NodeScaledownAnnotationController) reconcileAllNodes(ctx context.Contex
439433}
440434
441435func (c * NodeScaledownAnnotationController ) reconcileNode (ctx context.Context , nodeName string ) error {
442- timer := prometheus .NewTimer (NodeScaledownAnnotationReconcileDuration .WithLabelValues ("node" ))
443- defer timer .ObserveDuration ()
444-
445436 var workspaceList workspacev1.WorkspaceList
446437 if err := c .List (ctx , & workspaceList , client.MatchingFields {
447438 "status.runtime.nodeName" : nodeName ,
0 commit comments