Skip to content

Commit

Permalink
fix: add in v1beta1 termination metrics label (aws#606)
Browse files Browse the repository at this point in the history
  • Loading branch information
njtran authored Oct 16, 2023
1 parent c93b071 commit 7e01cfb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/controllers/node/termination/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ func (c *Controller) removeFinalizer(ctx context.Context, n *v1.Node) error {
// We use stored.DeletionTimestamp since the api-server may give back a node after the patch without a deletionTimestamp
TerminationSummary.With(prometheus.Labels{
metrics.ProvisionerLabel: n.Labels[v1alpha5.ProvisionerNameLabelKey],
metrics.NodePoolLabel: n.Labels[v1beta1.NodePoolLabelKey],
}).Observe(time.Since(stored.DeletionTimestamp.Time).Seconds())
logging.FromContext(ctx).Infof("deleted node")
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/node/termination/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var (
Help: "The time taken between a node's deletion request and the removal of its finalizer",
Objectives: metrics.SummaryObjectives(),
},
[]string{metrics.ProvisionerLabel},
[]string{metrics.ProvisionerLabel, metrics.NodePoolLabel},
)
)

Expand Down

0 comments on commit 7e01cfb

Please sign in to comment.