Skip to content

Commit

Permalink
controllers: trigger reconcile for claims when the desired hash changes
Browse files Browse the repository at this point in the history
add a watch for storageClient annotation change in the claim controller

Signed-off-by: Rewant Soni <[email protected]>
  • Loading branch information
rewantsoni committed Feb 6, 2025
1 parent 820dc23 commit 78121c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/controller/storageclaim_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ func (r *StorageClaimReconciler) SetupWithManager(mgr ctrl.Manager) error {
),
),
builder.OnlyMetadata,
)
).
Watches(&v1alpha1.StorageClient{}, &handler.EnqueueRequestForObject{}, builder.WithPredicates(predicate.AnnotationChangedPredicate{}))
if r.AvailableCrds[VolumeGroupSnapshotClassCrdName] {
bldr = bldr.Owns(&groupsnapapi.VolumeGroupSnapshotClass{})
}
Expand Down

0 comments on commit 78121c9

Please sign in to comment.