fix ingress-nginx panic when the certificate format is wrong. (#7443)
* fix ingress-nginx panic when the certificate format is wrong. Signed-off-by: wang_wenhu <976400757@qq.com> * Add unit test. Signed-off-by: wang_wenhu <976400757@qq.com> * Update controller_test.go
This commit is contained in:
parent
c43ea4d6e1
commit
6593cb244b
2 changed files with 51 additions and 1 deletions
|
|
@ -1493,7 +1493,7 @@ func extractTLSSecretName(host string, ing *ingress.Ingress,
|
|||
continue
|
||||
}
|
||||
|
||||
if cert == nil { // for tests
|
||||
if cert == nil || cert.Certificate == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue