Export webhook metrics to prometheus#4707
Conversation
knative-prow-robot
left a comment
There was a problem hiding this comment.
@anniefu: 0 warnings.
Details
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 |
|
/assign @evankanderson |
evankanderson
left a comment
There was a problem hiding this comment.
/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.
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 DetailsNeeds 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