-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Export webhook metrics to prometheus #4707
Conversation
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.
@anniefu: 0 warnings.
In response to this:
Fixes #1279
Proposed Changes
- Enable webhook service to export metrics (Prometheus by default)
See knative/pkg#503 for more information on the reported webhook metrics
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.
/assign @vaikas-google |
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.
/assign @mattmoor
/assign @evankanderson |
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.
/lgtm
/approve
Some design comments not for this PR.
return v1beta1.WithUpgradeViaDefaulting(store.ToContext(ctx)) | ||
} | ||
|
||
controller, err := webhook.NewAdmissionController(kubeClient, options, handlers, logger, ctxFunc, true) |
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.
It's unfortunate that "DisallowUnknownFields" gets collapsed to true
in this constructor. Not for this PR, but it would be nice to have a signature like:
controller, err := webhook.AdmissionController(
kubeClient,
handlers,
logger,
webhook.EnrichContext(ctxFunc),
webhook.Namespace(system.Namespace()),
webhook.Secret("webhook-certs"),
webhook.WebhookName("webhook.serving.knative.dev"),
webhook.UnknownFields)
Where the default context function, port, and some other items were already set, and we only needed to override some fields. Since you're now returning an error
, you could also complain at this point if Secret, Name, etc were not set.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: anniefu, evankanderson 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 |
Fixes #1279
Proposed Changes
See knative/pkg#503 for more information on the reported webhook metrics