core: fix deletion of the osd-replace-config cm

MustDelete DeleteOption was set to `true` when deleting
osd-repalce-config configMap.  This cm won't existing after
all the OSDs get migrated. So deletion of the non-existent
cm will result in error. This PR removes `mustDelete: true` from
the DeletionOption when deleting osd-replace-config configmap

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit 8dd237b460)
This commit is contained in:
Santosh Pillai authored and Mergify committed 2024-10-16 13:50:55 +00:00
1 parent 1686b1a3df
commit f43e088fda
1 file changed
+1 -1
+1 -1
View File
@@ -294,7 +294,7 @@ func (c *Cluster) Start() error {
}
if c.spec.Storage.Store.UpdateStore == OSDStoreUpdateConfirmation {
delOpts := &k8sutil.DeleteOptions{MustDelete: true, WaitOptions: k8sutil.WaitOptions{Wait: true}}
delOpts := &k8sutil.DeleteOptions{WaitOptions: k8sutil.WaitOptions{Wait: true}}
err := k8sutil.DeleteConfigMap(c.clusterInfo.Context, c.context.Clientset, OSDReplaceConfigName, namespace, delOpts)
if err != nil {
if kerrors.IsNotFound(err) {