Skip to content

Commit 5386c12

Browse files
committed
Update predicates
1 parent 56a5bba commit 5386c12

13 files changed

+11
-286
lines changed

controllers/azureasomanagedcluster_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (r *AzureASOManagedClusterReconciler) SetupWithManager(ctx context.Context,
8989
),
9090
builder.WithPredicates(
9191
predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue),
92-
ClusterUpdatePauseChange(log),
92+
predicates.ClusterPausedTransitions(mgr.GetScheme(), log),
9393
),
9494
).
9595
Watches(

controllers/azureasomanagedcontrolplane_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func (r *AzureASOManagedControlPlaneReconciler) SetupWithManager(ctx context.Con
7878
handler.EnqueueRequestsFromMapFunc(clusterToAzureASOManagedControlPlane),
7979
builder.WithPredicates(
8080
predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue),
81-
ClusterPauseChangeAndInfrastructureReady(mgr.GetScheme(), log),
81+
predicates.ClusterPausedTransitionsOrInfrastructureProvisioned(mgr.GetScheme(), log),
8282
),
8383
).
8484
// User errors that CAPZ passes through agentPoolProfiles on create must be fixed in the

controllers/azureasomanagedmachinepool_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (r *AzureASOManagedMachinePoolReconciler) SetupWithManager(ctx context.Cont
8585
predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue),
8686
predicates.Any(mgr.GetScheme(), log,
8787
predicates.ClusterControlPlaneInitialized(mgr.GetScheme(), log),
88-
ClusterUpdatePauseChange(log),
88+
predicates.ClusterPausedTransitions(mgr.GetScheme(), log),
8989
),
9090
),
9191
).

controllers/azurecluster_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func (acr *AzureClusterReconciler) SetupWithManager(ctx context.Context, mgr ctr
9595
&clusterv1.Cluster{},
9696
handler.EnqueueRequestsFromMapFunc(util.ClusterToInfrastructureMapFunc(ctx, infrav1.GroupVersion.WithKind(infrav1.AzureClusterKind), mgr.GetClient(), &infrav1.AzureCluster{})),
9797
builder.WithPredicates(
98-
ClusterUpdatePauseChange(log),
98+
predicates.ClusterPausedTransitions(mgr.GetScheme(), log),
9999
predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, acr.WatchFilterValue),
100100
),
101101
).

controllers/azurejson_machine_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func (r *AzureJSONMachineReconciler) SetupWithManager(ctx context.Context, mgr c
8383
&clusterv1.Cluster{},
8484
handler.EnqueueRequestsFromMapFunc(azureMachineMapper),
8585
builder.WithPredicates(
86-
util.ClusterPausedTransitionsOrInfrastructureReady(mgr.GetScheme(), log),
86+
predicates.ClusterPausedTransitionsOrInfrastructureProvisioned(mgr.GetScheme(), log),
8787
predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue),
8888
),
8989
).

controllers/azurejson_machinepool_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func (r *AzureJSONMachinePoolReconciler) SetupWithManager(ctx context.Context, m
7777
&clusterv1.Cluster{},
7878
handler.EnqueueRequestsFromMapFunc(azureMachinePoolMapper),
7979
builder.WithPredicates(
80-
util.ClusterPausedTransitionsOrInfrastructureReady(mgr.GetScheme(), log),
80+
predicates.ClusterPausedTransitionsOrInfrastructureProvisioned(mgr.GetScheme(), log),
8181
predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue),
8282
),
8383
).

controllers/azurejson_machinetemplate_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (r *AzureJSONTemplateReconciler) SetupWithManager(ctx context.Context, mgr
7979
&clusterv1.Cluster{},
8080
handler.EnqueueRequestsFromMapFunc(azureMachineTemplateMapper),
8181
builder.WithPredicates(
82-
util.ClusterPausedTransitionsOrInfrastructureReady(mgr.GetScheme(), log),
82+
predicates.ClusterPausedTransitionsOrInfrastructureProvisioned(mgr.GetScheme(), log),
8383
predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), log, r.WatchFilterValue),
8484
),
8585
).

controllers/azuremachine_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func (amr *AzureMachineReconciler) SetupWithManager(ctx context.Context, mgr ctr
116116
&clusterv1.Cluster{},
117117
handler.EnqueueRequestsFromMapFunc(azureMachineMapper),
118118
builder.WithPredicates(
119-
ClusterPauseChangeAndInfrastructureReady(mgr.GetScheme(), log),
119+
predicates.ClusterPausedTransitionsOrInfrastructureProvisioned(mgr.GetScheme(), log),
120120
predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, amr.WatchFilterValue),
121121
),
122122
).

controllers/azuremanagedcontrolplane_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func (amcpr *AzureManagedControlPlaneReconciler) SetupWithManager(ctx context.Co
9696
&clusterv1.Cluster{},
9797
handler.EnqueueRequestsFromMapFunc(amcpr.ClusterToAzureManagedControlPlane),
9898
builder.WithPredicates(
99-
ClusterPauseChangeAndInfrastructureReady(mgr.GetScheme(), log),
99+
predicates.ClusterPausedTransitionsOrInfrastructureProvisioned(mgr.GetScheme(), log),
100100
predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, amcpr.WatchFilterValue),
101101
),
102102
).

controllers/azuremanagedmachinepool_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func (ammpr *AzureManagedMachinePoolReconciler) SetupWithManager(ctx context.Con
116116
&clusterv1.Cluster{},
117117
handler.EnqueueRequestsFromMapFunc(azureManagedMachinePoolMapper),
118118
builder.WithPredicates(
119-
ClusterPauseChangeAndInfrastructureReady(mgr.GetScheme(), log),
119+
predicates.ClusterPausedTransitionsOrInfrastructureProvisioned(mgr.GetScheme(), log),
120120
predicates.ResourceHasFilterLabel(mgr.GetScheme(), log, ammpr.WatchFilterValue),
121121
),
122122
).

0 commit comments

Comments
 (0)