Skip to content

Commit

Permalink
Merge pull request #293 from rewantsoni/clientProfileMapping
Browse files Browse the repository at this point in the history
controllers: set clientProfile name in mapping
  • Loading branch information
openshift-merge-bot[bot] authored Dec 10, 2024
2 parents 4b75856 + 80d50e5 commit 273a0c9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/controller/storageclient_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,13 @@ func (r *StorageClientReconciler) reconcilePhases() (ctrl.Result, error) {
if err := json.Unmarshal(eResource.Data, &clientProfileMapping.Spec); err != nil {
return fmt.Errorf("failed to unmarshall clientProfileMapping spec: %v", err)
}
// TODO: This is a temporary solution till we have a single clientProfile for all storageClass
// sent from Provider
clientProfileHash := utils.GetMD5Hash(fmt.Sprintf("%s-ceph-rbd", r.storageClient.Name))
for i := range clientProfileMapping.Spec.Mappings {
clientProfileMapping.Spec.Mappings[i].LocalClientProfile = clientProfileHash
clientProfileMapping.Spec.Mappings[i].RemoteClientProfile = clientProfileHash
}
return nil
}); err != nil {
return reconcile.Result{}, fmt.Errorf("failed to reconcile clientProfileMapping: %v", err)
Expand Down

0 comments on commit 273a0c9

Please sign in to comment.