feat(cert-manager): Add KSM metrics for Challenge CRs - #2802
Conversation
Configures kube-state-metrics to track `acme.cert-manager.io/v1` `Challenge` Custom Resources. This is required for alert rules monitoring challenge queue saturation and stale challenges, as the native cert-manager challenge metrics are not available in the currently deployed versions. Adds two metrics: - `certmanager_challenge_cr_created`: Gauge tracking the creation timestamp. - `certmanager_challenge_cr_info`: Info metric exposing the `state` label from `status.state` (e.g., pending, processing). Also grants the kube-state-metrics ClusterRole `get`, `list`, `watch` access to `challenges` in the `acme.cert-manager.io` API group. Related to: ROSAENG-3733 Co-authored-by: Cursor <cursoragent@cursor.com>
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (3)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughUpdates the kube-state-metrics ConfigMap to add a cert-manager Challenge custom-resource metric definition (created gauge and info state label) and fixes an existing VolumeSnapshot gauge path indentation. Extends the ClusterRole to grant get/list/watch on acme.cert-manager.io challenges and adds watch on VolumeSnapshots. ChangesCert-manager Challenge metrics and RBAC
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: Cursor <cursoragent@cursor.com>
|
@vittico: all tests passed! Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
|
/lgtm |
|
@vittico: you cannot LGTM your own PR. DetailsIn response to this:
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-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: eqrx, vittico 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 |
Configures kube-state-metrics to track
acme.cert-manager.io/v1ChallengeCustom Resources. This is required for alert rules monitoring challenge queue saturation and stale challenges, as the native cert-manager challenge metrics are not available in the currently deployed versions.Adds two metrics:
certmanager_challenge_cr_created: Gauge tracking the creation timestamp.certmanager_challenge_cr_info: Info metric exposing thestatelabel fromstatus.state(e.g., pending, processing).Also grants the kube-state-metrics ClusterRole
get,list,watchaccess tochallengesin theacme.cert-manager.ioAPI group.Related to: ROSAENG-3733
What type of PR is this?
(bug/feature/cleanup/documentation)
What this PR does / why we need it?
Which Jira/Github issue(s) this PR fixes?
Fixes #
Special notes for your reviewer:
Pre-checks (if applicable):
Tested latest changes against a cluster
Included documentation changes with PR
If this is a new object that is not intended for the FedRAMP environment (if unsure, please reach out to team FedRAMP), please exclude it with:
Summary by CodeRabbit
New Features
Bug Fixes