Skip to content

Commit 17fecef

Browse files
committed
More watchers missing filter label
1 parent 8807321 commit 17fecef

8 files changed

+9
-0
lines changed

controllers/azurecluster_controller.go

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ func (r *AzureClusterReconciler) SetupWithManager(ctx context.Context, mgr ctrl.
9393
&source.Kind{Type: &clusterv1.Cluster{}},
9494
handler.EnqueueRequestsFromMapFunc(util.ClusterToInfrastructureMapFunc(infrav1.GroupVersion.WithKind("AzureCluster"))),
9595
predicates.ClusterUnpaused(log),
96+
predicates.ResourceNotPausedAndHasFilterLabel(ctrl.LoggerFrom(ctx), r.WatchFilterValue),
9697
); err != nil {
9798
return errors.Wrap(err, "failed adding a watch for ready clusters")
9899
}

controllers/azureidentity_controller.go

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ func (r *AzureIdentityReconciler) SetupWithManager(ctx context.Context, mgr ctrl
8484
&source.Kind{Type: &clusterv1.Cluster{}},
8585
handler.EnqueueRequestsFromMapFunc(util.ClusterToInfrastructureMapFunc(infrav1.GroupVersion.WithKind("AzureCluster"))),
8686
predicates.ClusterUnpaused(log),
87+
predicates.ResourceNotPausedAndHasFilterLabel(ctrl.LoggerFrom(ctx), r.WatchFilterValue),
8788
); err != nil {
8889
return errors.Wrap(err, "failed adding a watch for ready clusters")
8990
}

controllers/azuremachine_controller.go

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ func (r *AzureMachineReconciler) SetupWithManager(ctx context.Context, mgr ctrl.
113113
&source.Kind{Type: &clusterv1.Cluster{}},
114114
handler.EnqueueRequestsFromMapFunc(azureMachineMapper),
115115
predicates.ClusterUnpausedAndInfrastructureReady(log),
116+
predicates.ResourceNotPausedAndHasFilterLabel(ctrl.LoggerFrom(ctx), r.WatchFilterValue),
116117
); err != nil {
117118
return errors.Wrap(err, "failed adding a watch for ready clusters")
118119
}

exp/controllers/azuremachinepool_controller.go

+2
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ func (ampr *AzureMachinePoolReconciler) SetupWithManager(ctx context.Context, mg
126126
&source.Kind{Type: &infrav1exp.AzureMachinePoolMachine{}},
127127
handler.EnqueueRequestsFromMapFunc(AzureMachinePoolMachineMapper(mgr.GetScheme(), log)),
128128
MachinePoolMachineHasStateOrVersionChange(log),
129+
predicates.ResourceNotPausedAndHasFilterLabel(ctrl.LoggerFrom(ctx), ampr.WatchFilterValue),
129130
); err != nil {
130131
return errors.Wrap(err, "failed adding a watch for AzureMachinePoolMachine")
131132
}
@@ -140,6 +141,7 @@ func (ampr *AzureMachinePoolReconciler) SetupWithManager(ctx context.Context, mg
140141
&source.Kind{Type: &clusterv1.Cluster{}},
141142
handler.EnqueueRequestsFromMapFunc(azureMachinePoolMapper),
142143
predicates.ClusterUnpausedAndInfrastructureReady(log),
144+
predicates.ResourceNotPausedAndHasFilterLabel(ctrl.LoggerFrom(ctx), ampr.WatchFilterValue),
143145
); err != nil {
144146
return errors.Wrap(err, "failed adding a watch for ready clusters")
145147
}

exp/controllers/azuremachinepoolmachine_controller.go

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ func (ampmr *AzureMachinePoolMachineController) SetupWithManager(ctx context.Con
109109
&source.Kind{Type: &infrav1exp.AzureMachinePool{}},
110110
handler.EnqueueRequestsFromMapFunc(AzureMachinePoolToAzureMachinePoolMachines(ctx, mgr.GetClient(), log)),
111111
MachinePoolModelHasChanged(log),
112+
predicates.ResourceNotPausedAndHasFilterLabel(ctrl.LoggerFrom(ctx), ampmr.WatchFilterValue),
112113
); err != nil {
113114
return errors.Wrapf(err, "failed adding a watch for AzureMachinePool model changes")
114115
}

exp/controllers/azuremanagedcluster_controller.go

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ func (r *AzureManagedClusterReconciler) SetupWithManager(ctx context.Context, mg
8383
&source.Kind{Type: &clusterv1.Cluster{}},
8484
handler.EnqueueRequestsFromMapFunc(util.ClusterToInfrastructureMapFunc(infrav1exp.GroupVersion.WithKind("AzureManagedCluster"))),
8585
predicates.ClusterUnpaused(log),
86+
predicates.ResourceNotPausedAndHasFilterLabel(ctrl.LoggerFrom(ctx), r.WatchFilterValue),
8687
); err != nil {
8788
return errors.Wrap(err, "failed adding a watch for ready clusters")
8889
}

exp/controllers/azuremanagedcontrolplane_controller.go

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ func (r *AzureManagedControlPlaneReconciler) SetupWithManager(ctx context.Contex
9595
&source.Kind{Type: &clusterv1.Cluster{}},
9696
handler.EnqueueRequestsFromMapFunc(util.ClusterToInfrastructureMapFunc(infrav1exp.GroupVersion.WithKind("AzureManagedControlPlane"))),
9797
predicates.ClusterUnpausedAndInfrastructureReady(log),
98+
predicates.ResourceNotPausedAndHasFilterLabel(ctrl.LoggerFrom(ctx), r.WatchFilterValue),
9899
); err != nil {
99100
return errors.Wrap(err, "failed adding a watch for ready clusters")
100101
}

exp/controllers/azuremanagedmachinepool_controller.go

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ func (r *AzureManagedMachinePoolReconciler) SetupWithManager(ctx context.Context
108108
&source.Kind{Type: &clusterv1.Cluster{}},
109109
handler.EnqueueRequestsFromMapFunc(util.ClusterToInfrastructureMapFunc(infrav1exp.GroupVersion.WithKind("AzureManagedMachinePool"))),
110110
predicates.ClusterUnpausedAndInfrastructureReady(log),
111+
predicates.ResourceNotPausedAndHasFilterLabel(ctrl.LoggerFrom(ctx), r.WatchFilterValue),
111112
); err != nil {
112113
return errors.Wrap(err, "failed adding a watch for ready clusters")
113114
}

0 commit comments

Comments
 (0)