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

Change certificates expiration from 14 to 13 days #758

Merged
merged 2 commits into from
May 15, 2023

Conversation

mnitchev
Copy link
Member

The reason for this is a bug in cert manager. The Certificates we have contain the CA that they've been signed with. When a CA has been renewed, the Certificates that use it will not be updated until they themselves are renewed. This causes an issue because the Certificate (in KIAM's case) will renew a few hours after the CA. This is enough time for the CA in the kiam certificate to expire and cause a flurry of alerts.
This has mainly been observed with KIAM, but we decided to change all alerts.

See cert-manager/cert-manager#5851 for cert-manager bug
See https://gigantic.slack.com/archives/C020E38NGTZ/p1684138271354269 for discussion around this.

Checklist

mnitchev added 2 commits May 15, 2023 11:51
The reason for this is a bug in cert manager. The Certificates we have
contain the CA that they've been signed with. When a CA has been
renewed, the Certificates that use it will not be updated until they
themselves are renewed. This causes an issue because the Certificate (in
KIAM's case) will renew a few hours after the CA. This is enough time
for the CA in the kiam certificate to expire and cause a flurry of
alerts.
This has mainly been observed with KIAM, but we decided to change all
alerts.

See cert-manager/cert-manager#5851
@mnitchev mnitchev requested a review from a team May 15, 2023 09:00
@mnitchev mnitchev requested a review from a team as a code owner May 15, 2023 09:00
@@ -60,7 +60,7 @@ spec:
annotations:
description: '{{`Certificate CR {{ $labels.namespace }}/{{ $labels.name }} on {{ $labels.cluster_id }} will expire in less than two weeks.`}}'
opsrecipe: managed-app-cert-manager/certificate-secret-will-expire-in-less-than-two-weeks/
expr: (cert_exporter_certificate_cr_not_after{managed_issuer="true",namespace=~"kube-system|giantswarm|monitoring"} - time()) < 2 * 7 * 24 * 60 * 60
expr: (cert_exporter_certificate_cr_not_after{managed_issuer="true",namespace=~"kube-system|giantswarm|monitoring"} - time()) < 13 * 24 * 60 * 60
Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer 2 * 6.5 :trollface:

@mnitchev mnitchev merged commit 20b7f02 into master May 15, 2023
@mnitchev mnitchev deleted the pr-certificates-expiration branch May 15, 2023 09:06
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