Merge pull request #3947 from vncntvandriessche/bug/silent-custom-default-certificate-failure
Adds a log warning when falling back to default fake cert
This commit is contained in:
commit
4bee401d16
1 changed files with 8 additions and 4 deletions
|
@ -866,10 +866,14 @@ func (n *NGINXController) createServers(data []*ingress.Ingress,
|
|||
defaultPemSHA := n.cfg.FakeCertificateSHA
|
||||
|
||||
// read custom default SSL certificate, fall back to generated default certificate
|
||||
if n.cfg.DefaultSSLCertificate != "" {
|
||||
defaultCertificate, err := n.store.GetLocalSSLCert(n.cfg.DefaultSSLCertificate)
|
||||
if err == nil {
|
||||
defaultPemFileName = defaultCertificate.PemFileName
|
||||
defaultPemSHA = defaultCertificate.PemSHA
|
||||
} else {
|
||||
klog.Warningf("Error loading custom default certificate, falling back to generated default:\n%v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// initialize default server and root location
|
||||
|
|
Loading…
Reference in a new issue