Skip to content
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

Merged
merged 1 commit into from
Jul 12, 2019

Conversation

anniefu
Copy link
Contributor

@anniefu anniefu commented Jul 11, 2019

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

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jul 11, 2019
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 11, 2019
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a 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.

@knative-prow-robot knative-prow-robot added area/API API objects and controllers area/monitoring labels Jul 11, 2019
@anniefu
Copy link
Contributor Author

anniefu commented Jul 11, 2019

/assign @vaikas-google

Copy link
Contributor

@vagababov vagababov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/assign @mattmoor

@anniefu
Copy link
Contributor Author

anniefu commented Jul 11, 2019

/assign @evankanderson

Copy link
Member

@evankanderson evankanderson left a 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)
Copy link
Member

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.

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 11, 2019
@knative-prow-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 11, 2019
@knative-prow-robot knative-prow-robot merged commit b105e59 into knative:master Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/API API objects and controllers area/monitoring cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Webhook metrics
7 participants