Fix panic if a tempfile cannot be created
This commit is contained in:
parent
b90003abde
commit
b7e8bde0e9
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ func AddOrUpdateCertAndKey(name string, cert, key, ca []byte) (*ingress.SSLCert,
|
|||
|
||||
tempPemFile, err := ioutil.TempFile(ingress.DefaultSSLDirectory, pemName)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not create temp pem file %v: %v", tempPemFile.Name(), err)
|
||||
return nil, fmt.Errorf("could not create temp pem file %v: %v", pemFileName, err)
|
||||
}
|
||||
|
||||
_, err = tempPemFile.Write(cert)
|
||||
|
|
Loading…
Reference in a new issue