Fix backup security contexts
@@ -285,10 +285,12 @@ func (cr *PerconaXtraDBCluster) setSecurityContext(serverVersion *ServerVersion)
}
if cr.Spec.Backup != nil {
for k := range cr.Spec.Backup.Storages {
+ if cr.Spec.Backup.Storages[k].PodSecurityContext == nil {
cr.Spec.Backup.Storages[k].PodSecurityContext = sc
}
}
}
+}
// CheckNSetDefaults sets defaults options and overwrites wrong settings
// and checks if other options' values are allowable
