less prone way to check if cert should be deleted
This commit is contained in:
parent
1f08f74959
commit
69662e548c
1 changed files with 2 additions and 2 deletions
|
@ -866,8 +866,8 @@ func (l *L7) Cleanup() error {
|
||||||
}
|
}
|
||||||
l.tps = nil
|
l.tps = nil
|
||||||
}
|
}
|
||||||
// Delete the SSL cert if it is not a pre-created GCE cert.
|
// Delete the SSL cert if it is from a secret, not referencing a pre-created GCE cert.
|
||||||
if l.sslCert != nil && l.sslCert.Name != l.runtimeInfo.TLSName {
|
if l.sslCert != nil && l.runtimeInfo.TLSName == "" {
|
||||||
glog.Infof("Deleting sslcert %v", l.sslCert.Name)
|
glog.Infof("Deleting sslcert %v", l.sslCert.Name)
|
||||||
if err := l.cloud.DeleteSslCertificate(l.sslCert.Name); err != nil {
|
if err := l.cloud.DeleteSslCertificate(l.sslCert.Name); err != nil {
|
||||||
if !utils.IsHTTPErrorCode(err, http.StatusNotFound) {
|
if !utils.IsHTTPErrorCode(err, http.StatusNotFound) {
|
||||||
|
|
Loading…
Reference in a new issue