New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Add capacity-type label to karpenter_nodeclaims_registered and karpen… #1211
base: main
Are you sure you want to change the base?
fix: Add capacity-type label to karpenter_nodeclaims_registered and karpen… #1211
Conversation
…ter_nodes_created
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tvonhacht-apple The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @tvonhacht-apple. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@@ -70,10 +70,12 @@ func (r *Registration) Reconcile(ctx context.Context, nodeClaim *v1beta1.NodeCla | |||
nodeClaim.Status.NodeName = node.Name | |||
|
|||
metrics.NodeClaimsRegisteredCounter.With(prometheus.Labels{ | |||
metrics.NodePoolLabel: nodeClaim.Labels[v1beta1.NodePoolLabelKey], | |||
metrics.NodePoolLabel: nodeClaim.Labels[v1beta1.NodePoolLabelKey], | |||
metrics.CapacityTypeLabel: nodeClaim.Labels[v1beta1.CapacityTypeLabelKey], | |||
}).Inc() | |||
metrics.NodesCreatedCounter.With(prometheus.Labels{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might just need Nodeclaims or Node to have the capacity type. I can remove NodesCreated, I am not aware of the use case of adding both here in the first place, please advice
@@ -133,7 +133,8 @@ func (c *Controller) removeFinalizer(ctx context.Context, n *v1.Node) error { | |||
return client.IgnoreNotFound(fmt.Errorf("patching node, %w", err)) | |||
} | |||
metrics.NodesTerminatedCounter.With(prometheus.Labels{ | |||
metrics.NodePoolLabel: n.Labels[v1beta1.NodePoolLabelKey], | |||
metrics.NodePoolLabel: n.Labels[v1beta1.NodePoolLabelKey], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only added it for NodesTermianted for completeness, if we add it to NodesCreated
This PR has been inactive for 14 days. StaleBot will close this stale PR after 14 more days of inactivity. |
…ter_nodes_created
Fixes #1210
Description
Removed
capacity_type
fromkarpenter_nodeclaims_created
as at that point it is not known, so it will always be empty.Added it for
karpenter_nodeclaims_registered
andkarpenter_nodes_created
as its available during that time.How was this change tested?
Tested in personal cluster
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.