Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
This commit is contained in:
parent
d6284d1672
commit
079d0cd415
1 changed files with 4 additions and 1 deletions
|
@ -1332,7 +1332,10 @@ func (n *NGINXController) createServers(data []*ingress.Ingress,
|
||||||
|
|
||||||
servers[host].SSLCert = cert
|
servers[host].SSLCert = cert
|
||||||
|
|
||||||
if cert.ExpireTime.Before(time.Now().Add(240 * time.Hour)) {
|
now := time.Now()
|
||||||
|
if cert.ExpireTime.Before(now) {
|
||||||
|
klog.Warningf("SSL certificate for server %q expired (%v)", host, cert.ExpireTime)
|
||||||
|
} else if cert.ExpireTime.Before(now.Add(240 * time.Hour)) {
|
||||||
klog.Warningf("SSL certificate for server %q is about to expire (%v)", host, cert.ExpireTime)
|
klog.Warningf("SSL certificate for server %q is about to expire (%v)", host, cert.ExpireTime)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue