feat: Add bootstrap NRC duration metric#294
Conversation
✅ Deploy Preview for node-readiness-controller canceled.
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rawadhossain The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @rawadhossain. 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 Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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-sigs/prow repository. |
Signed-off-by: Rawad Hossain <rawad.hossain00@gmail.com>
10d451f to
f85970c
Compare
| // bootstrapAnnotationPayload is the JSON value stored in a bootstrap-completion annotation. | ||
| type bootstrapAnnotationPayload struct { | ||
| RuleName string `json:"rule-name"` | ||
| TaintAppliedAt string `json:"taintAppliedAt,omitempty"` |
There was a problem hiding this comment.
What if the taint was not applied by NRC, rather it adopted the taints added by kubelet (via --register-with-taints), which is the preferred mode of operation for bootstrap-only mode? How does this handle the case?
| ) | ||
|
|
||
| // bootstrapAnnotationPayload is the JSON value stored in a bootstrap-completion annotation. | ||
| type bootstrapAnnotationPayload struct { |
There was a problem hiding this comment.
IMO, TaintAppliedAt and Completed are better suited for the dedicated NodeEvaluation 'status' api we planned. Can we discuss this during our next sync on how we could shape it in the alpha2 api?
|
PR needs rebase. DetailsInstructions 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-sigs/prow repository. |
|
@rawadhossain can you resolve the conflicts please! |
Description
This PR adds
node_readiness_bootstrap_nrc_duration_secondsmetric, which measures how long NRC itself holds a node, from when it first applies a rule taint until bootstrap completes.To record the start time, this extends the existing bootstrap annotation with
taintAppliedAtandcompletedSince
writeTaintAppliedAtnow creates the bootstrap annotation before completion,isBootstrapCompleted()now checks thecompletedfield rather than just the annotation's existence. Existing annotations from #224 are still treated as completed, so this remains backward compatible. Calling this out since it changes how bootstrap completion is determined.Related to Issue #182
Type of Change
/kind feature
Testing
isBootstrapCompleted, including backward compatibility and in progress statesChecklist
make testpassesmake lintpasses