-
Notifications
You must be signed in to change notification settings - Fork 456
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
Control the start of event reporting for expiring certificates #2232
Control the start of event reporting for expiring certificates #2232
Conversation
0b2bacb
to
8393905
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, verified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would like to see the expiration check to be moved out of the outer if
to ensure we're always reporting that. We have already spent a lot of Subnet hours, because of unnoticed certificate expirations.
Issue summary
In cases where users install certificates of short duration, kubernetes events are spammed with multiple warnings of certificate expiry. This is undesirable. A means on reducing the number of warnings produced is more desirable.
See #1791
In the tenant crd,
.spec.certExpiryAlertThreshold
represents the minimum number of days to expiry before an alert for an expiring certificate is fired.For example considering
.spec.certExpiryAlertThreshold = 1
, if a given certificate will expire in 7 days then expiration events will only be triggered 1 day before expiry.Test summary
certExpiryAlertThreshold
e.g.Verbose tests here:
https://github.com/allanrogerr/public/wiki/operator%E2%80%901791
Fixes: #1791