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
Add a new webhook request total metric and add a 1.0s bucket boundary to the webhook latency metric #103162
Add a new webhook request total metric and add a 1.0s bucket boundary to the webhook latency metric #103162
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. I understand the commands that are listed here. |
Welcome @rmoriar1! |
Hi @rmoriar1. Thanks for your PR. I'm waiting for a kubernetes 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. |
d85a012
to
5a9ed6d
Compare
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.
nevermind
staging/src/k8s.io/apiserver/pkg/admission/metrics/metrics_test.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/pkg/admission/metrics/metrics_test.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go
Outdated
Show resolved
Hide resolved
/cc @roycaihw |
7e41658
to
709279c
Compare
709279c
to
c3afa46
Compare
c3afa46
to
83bfc00
Compare
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go
Outdated
Show resolved
Hide resolved
looks generally good, some suggestions though. |
7fff1af
to
ebf40cb
Compare
ebf40cb
to
4b29bf3
Compare
4b29bf3
to
491c8c2
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lavalamp, logicalhan, rmoriar1 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
@rmoriar1 needs rebase |
Also add a 1.0s bucket boundary to the webhook latency metric.
491c8c2
to
8ed1628
Compare
Done. |
@lavalamp Mind re-reviewing after rebase? |
/lgtm |
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
What type of PR is this?
/kind feature
What this PR does / why we need it:
We have a webhook which is configured to fail open and we would like to use metrics to detect if it is working properly.
The existing
admission_webhook_rejection_count
metric doesn't track requests that failed open (because they are not considered rejections) and theadmission_webhook_admission_duration_seconds
only includes a bool indicating whether the request was rejected or not. As a result, we are unable to track the number of requests that have failed open.This PR adds a new
admission_webhook_request_total
metric which includes the webhook's HTTP response as a label. This will allow us to identify requests that have failed open.This also adds a new bucket boundary of 1.0s to the latency metric, which will enable us to get more accurate latency data from the webhook.
Special notes for your reviewer:
Does this PR introduce a user-facing change?