cert-manager / webhook-example

A cert-manager sample repository for creating an ACME DNS01 solver webhook
Apache License 2.0
108 stars 422 forks source link

Webhook CPU usage is rather high #43

Closed aellwein closed 2 years ago

aellwein commented 2 years ago

I occasionally look onto my k8s metrics (CPU/Mem Usage) and i found that the webhook server uses rather much CPU (up to 20 percent) over the time.

From my understanding, a webhook server is a simple k8s OpenAPI server, an HTTP server, which should be actually sleeping most of the time, is this correct? So the CPU load in my expectation should be at most 5%.

in this case, i'm wondering what is causing that CPU load... 🤔

fourstepper commented 2 years ago

I think you are talking about the built-in cert-manager webhook, right? If so, this is not the right place to ask.

This repository contains an example "template" on how to implement and deploy your own custom webhook for DNS01 challenges.

Try the #cert-manager Slack channel on the Kubernetes Slack

aellwein commented 2 years ago

@fourstepper you are right, the webhook server is implemented in cert-manager, but in my opinion all custom webhook implementations derived from this repository (including mine) are affected, because of this line here. Therefore i just wanted to leave it here, if someone else wonders about this behavior.