File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed
internal/controller/atlasthirdpartyintegrations Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -78,23 +78,20 @@ func NewAtlasThirdPartyIntegrationsReconciler(
78
78
79
79
// For prepares the controller for its target Custom Resource; AtlasThirdPartyIntegration
80
80
func (r * AtlasThirdPartyIntegrationHandler ) For () (client.Object , builder.Predicates ) {
81
- return & akov2.AtlasThirdPartyIntegration {}, builder .WithPredicates (predicate.GenerationChangedPredicate {})
81
+ obj := & akov2.AtlasThirdPartyIntegration {}
82
+ return obj , ctrlrtbuilder .WithPredicates (
83
+ predicate .Or (
84
+ mckpredicate .AnnotationChanged ("mongodb.com/reapply-period" ),
85
+ predicate.GenerationChangedPredicate {},
86
+ ),
87
+ mckpredicate .IgnoreDeletedPredicate [client.Object ](),
88
+ )
82
89
}
83
90
84
91
func (h * AtlasThirdPartyIntegrationHandler ) SetupWithManager (mgr ctrl.Manager , rec reconcile.Reconciler , defaultOptions controller.Options ) error {
85
92
h .Client = mgr .GetClient ()
86
- obj := & akov2.AtlasThirdPartyIntegration {}
87
93
return controllerruntime .NewControllerManagedBy (mgr ).
88
- For (
89
- obj ,
90
- ctrlrtbuilder .WithPredicates (
91
- predicate .Or (
92
- mckpredicate .AnnotationChanged ("mongodb.com/reapply-period" ),
93
- predicate.GenerationChangedPredicate {},
94
- ),
95
- mckpredicate .IgnoreDeletedPredicate [client.Object ](),
96
- ),
97
- ).
94
+ For (h .For ()).
98
95
Watches (
99
96
& akov2.AtlasProject {},
100
97
handler .EnqueueRequestsFromMapFunc (h .integrationForProjectMapFunc ()),
You can’t perform that action at this time.
0 commit comments