make sure the expire time is set when the certificate is in an infinite renewal loop
Signed-off-by: Gus Parvin <gparvin@us.ibm.com>
This commit is contained in:
parent
aceb997032
commit
ff3f198eca
@ -179,6 +179,9 @@ func (c *Controller) Sync(ctx context.Context, crt *v1alpha1.Certificate) (reque
|
||||
return c.issue(ctx, i, crtCopy)
|
||||
}
|
||||
|
||||
metaNotAfter := metav1.NewTime(cert.NotAfter)
|
||||
crtCopy.Status.NotAfter = &metaNotAfter
|
||||
|
||||
// check if the certificate needs renewal
|
||||
needsRenew := c.Context.IssuerOptions.CertificateNeedsRenew(cert)
|
||||
if needsRenew {
|
||||
@ -191,9 +194,6 @@ func (c *Controller) Sync(ctx context.Context, crt *v1alpha1.Certificate) (reque
|
||||
|
||||
// end checking if the TLS certificate is valid/needs a re-issue or renew
|
||||
|
||||
metaNotAfter := metav1.NewTime(cert.NotAfter)
|
||||
crtCopy.Status.NotAfter = &metaNotAfter
|
||||
|
||||
return false, nil
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user