-
Notifications
You must be signed in to change notification settings - Fork 5.3k
KubeClientCertificateExpiration alert false positives with cloud providers #6161 #6162
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
base: main
Are you sure you want to change the base?
KubeClientCertificateExpiration alert false positives with cloud providers #6161 #6162
Conversation
Fix KubeClientCertificateExpiration false positives with cloud providers Signed-off-by: romankucherov-cmyk <[email protected]>
[kube-prometheus-stack] Fix KubeClientCertificateExpiration false positives with cloud providers
charts/kube-prometheus-stack/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml
Show resolved
Hide resolved
Signed-off-by: romankucherov-cmyk <[email protected]>
Signed-off-by: romankucherov-cmyk <[email protected]>
Signed-off-by: romankucherov-cmyk <[email protected]>
| '$.Values.defaultRules.node.fsSelector': { | ||
| 'replacement': '{{ $.Values.defaultRules.node.fsSelector }}', | ||
| 'init': ''}, | ||
| '601200': { |
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.
Please add a comment here
| windows: true | ||
|
|
||
|
|
||
| kubeClientCertificateExpiration: "601200" |
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.
Please add more context/comments here.
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.
The replacement doesn't hit. I can't see any visible notes in charts/kube-prometheus-stack/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml.
And please bump the chart version, thanks!
Signed-off-by: romankucherov-cmyk <[email protected]>
Signed-off-by: romankucherov-cmyk <[email protected]>
Signed-off-by: romankucherov-cmyk <[email protected]>
Added comments to fsSelector and kubeClientCertificateExpiration in both values.yaml and sync_prometheus_rules.py. Verified with helm template — these values are currently not used in any rendered templates, so the replacement doesn’t hit. Left them documented for future/compatibility reasons. Also bumped the chart version. |
Ok, I would leave the PR open until the replacements hits. |
Fixes #6161
What this PR does / why we need it
Prevents false positives in KubeClientCertificateExpiration alert when using cloud providers that renew certificates exactly 7 days before expiration.
Problem
Cloud providers like DigitalOcean automatically renew certificates 7 days before expiration, causing the alert to trigger during normal maintenance operations.
Solution
Change warning threshold from 7 days (604,800s) to 6 days 22 hours (601,200s) to create a 2-hour buffer.
Changes
604800→601200in alert ruleTesting