Make CA age threshold delta more observable via more precision

Signed-off-by: Andrew Keesler <akeesler@vmware.com>
This commit is contained in:
Andrew Keesler 2020-08-20 11:42:29 -04:00
parent a26d86044e
commit 43888e9e0a
No known key found for this signature in database
GPG Key ID: 27CE0444346F9413

View File

@ -89,7 +89,7 @@ func (c *certsExpirerController) Sync(ctx controller.Context) error {
caLifetime := notAfter.Sub(notBefore)
caAge := time.Since(notBefore)
thresholdDelta := (float32(caAge) / float32(caLifetime)) - c.ageThreshold
klog.Infof("certsExpirerController Sync() found a CA age threshold delta of %.2f", thresholdDelta)
klog.Infof("certsExpirerController Sync() found a CA age threshold delta of %.9g", thresholdDelta)
if thresholdDelta > 0 {
err := c.k8sClient.
CoreV1().