Fix nil map panic when writing to an empty existing Secret
Signed-off-by: James Munnelly <james@munnelly.eu>
This commit is contained in:
parent
1a75d41429
commit
3d1183a169
@ -299,6 +299,9 @@ func (c *Controller) updateSecret(crt *v1alpha1.Certificate, namespace string, c
|
||||
}
|
||||
}
|
||||
|
||||
if secret.Data == nil {
|
||||
secret.Data = map[string][]byte{}
|
||||
}
|
||||
secret.Data[corev1.TLSCertKey] = cert
|
||||
secret.Data[corev1.TLSPrivateKeyKey] = key
|
||||
secret.Data[TLSCAKey] = ca
|
||||
|
||||
Loading…
Reference in New Issue
Block a user