Commit 319dca3e authored by Brad Davidson's avatar Brad Davidson Committed by Brad Davidson

Fix nil map in full snapshot configmap reconcile

If a full reconcile wins the race against sync of an individual snapshot resource, or someone intentionally deletes the configmap, the data map could be nil and cause a crash. Signed-off-by: 's avatarBrad Davidson <brad.davidson@rancher.com>
parent db7091b3
......@@ -252,6 +252,10 @@ func (e *etcdSnapshotHandler) reconcile() error {
}
}
if len(snapshots) > 0 && snapshotConfigMap.Data == nil {
snapshotConfigMap.Data = map[string]string{}
}
// Ensure keys for existing snapshots
for sfKey, esf := range snapshots {
sf := snapshotFile{}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment