Skip to content

Commit

Permalink
update ManifestWork for VRC when FSID is changed
Browse files Browse the repository at this point in the history
In some cases, FSID can be nil and later be populated. For such cases,
we need to ensure that ManifestWork for VRC is updated with newly
generated replication ID.

Signed-off-by: Umanga Chapagain <[email protected]>
  • Loading branch information
umangachapagain committed Nov 29, 2023
1 parent 035ad5c commit 5d1c029
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions controllers/drpolicy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,14 @@ func (r *DRPolicyReconciler) createOrUpdateManifestWorkForVRC(ctx context.Contex
},
},
},
Spec: workv1.ManifestWorkSpec{
Workload: workv1.ManifestsTemplate{Manifests: []workv1.Manifest{
manifest,
}},
},
}
_, err = controllerutil.CreateOrUpdate(ctx, r.HubClient, &mw, func() error {
mw.Spec = workv1.ManifestWorkSpec{
Workload: workv1.ManifestsTemplate{
Manifests: []workv1.Manifest{
manifest,
}},
}
return nil
})

Expand Down

0 comments on commit 5d1c029

Please sign in to comment.