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

chore: add probes on all containers #234

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

zwindler
Copy link
Contributor

Hello,

I'm deploying this exporter on my cluster and we have a Kyverno policy that requires all pods to have liveness/readiness probes

Since those are exporters containers, I felt it was not a bad thing to make sure that the exporter is indeed listening on the exposed port

It's best practice to not have liveness === readiness but in this case I think this is acceptable, unless you want to take the time to create proper HTTP endpoints in the code to add a /live and a /ready (I can do it but I'm not sure this is worth it)

@npdgm npdgm self-assigned this Jan 18, 2024
Copy link
Contributor

@paullaffitte paullaffitte left a comment

Choose a reason for hiding this comment

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

Hi! Thanks for your contribution!

The /metrics endpoint generate metrics on the fly, so relying on it for probes isn't very cost-efficient. Could you add and use a /healthz endpoint instead? The liveness and readiness probes can both rely on it. You don't have to implement any logic, in the futur we could think about implementing some real checks, but for now simply responding would be enough.

@zwindler
Copy link
Contributor Author

Sure, that makes much more sense

I'll work on this soon and will update the branch

@zwindler
Copy link
Contributor Author

@paullaffitte I added a super basic handler to the ServeMux (/healthz as suggested)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants