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

count sync errors #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

count sync errors #1

wants to merge 1 commit into from

Conversation

jacobstr
Copy link
Owner

@jacobstr jacobstr commented May 24, 2019

What this PR does / why we need it

It adds metrics to count failures in the sync reconciliation loop of the certificates controller. I'd like visibility into e.g. failure renewing certificates. I see that there's a similar MR to count sync operations across controllers (cert-manager#1692). That one looks like it casts a wider net but doesn't capture whether an error occurred and why it occurred.

Reviewer Notes
The implementation feels a bit cumbersome, wrapping the c.issue calls up felt better than if err / else blocks throughout the relevant lines.

Alternate Approach: Convert Events to Metrics

The controller does emit events. If there's a general cluster component that converts events into metrics, one could use that to generate metrics from the events the controller already emits. There is kube-state-metrics, but it doesn't expose event data - possibly because events are a poor match for "state".

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