Skip to content

Commit

Permalink
Merge pull request red-hat-storage#2719 from bernerhat/update-client-…
Browse files Browse the repository at this point in the history
…map-noobaa

Disable client operator's noobaa subscription management
  • Loading branch information
openshift-merge-bot[bot] authored Aug 1, 2024
2 parents 2a54911 + f1d9a1a commit ad2eaa4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controllers/storagecluster/provider_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"math/rand"
"os"
"sort"
"strconv"
"time"

"go.uber.org/multierr"
Expand Down Expand Up @@ -42,6 +43,7 @@ const (

ocsClientConfigMapName = "ocs-client-operator-config"
deployCSIKey = "DEPLOY_CSI"
manageNoobaaSubKey = "manageNoobaaSubscription"
)

type ocsProviderServer struct{}
Expand Down Expand Up @@ -537,10 +539,11 @@ func (o *ocsProviderServer) updateClientConfigMap(r *StorageClusterReconciler, n
clientConfig.Data = map[string]string{}
}
clientConfig.Data[deployCSIKey] = "true"
clientConfig.Data[manageNoobaaSubKey] = strconv.FormatBool(false)

if !maps.Equal(clientConfig.Data, existingData) {
if err := r.Client.Update(r.ctx, clientConfig); err != nil {
r.Log.Error(err, "failed to update ocs client configmap for enabling CSI")
r.Log.Error(err, "failed to update client operator's configmap data")
return err
}
}
Expand Down

0 comments on commit ad2eaa4

Please sign in to comment.