mirror of
https://github.com/rancher/dynamiclistener.git
synced 2025-09-14 13:59:53 +00:00
Fix panic on nil secret (#204)
Use configured secret namespace/name in error message, to avoid panicing if the secret is invalid because it is nil Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
@@ -212,7 +212,7 @@ func (s *storage) saveInK8s(secret *v1.Secret) (*v1.Secret, error) {
|
||||
|
||||
// ensure that the merged secret actually contains data before overwriting the existing fields
|
||||
if !cert.IsValidTLSSecret(secret) {
|
||||
logrus.Warnf("Skipping save of TLS secret for %s/%s due to missing certificate data", secret.Namespace, secret.Name)
|
||||
logrus.Warnf("Skipping save of TLS secret for %s/%s due to missing certificate data", s.namespace, s.name)
|
||||
return targetSecret, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user