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 authored and openshift-cherrypick-robot committed Nov 30, 2023
1 parent 0f66fd7 commit f60550f
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 f60550f

Please sign in to comment.