Skip to content

Commit 7ca54bf

Browse files
committed
Use the And controller-runtime function to create a composite predicate
Use the `And` controller-runtime function to create a composite predicate.
1 parent 5b857c3 commit 7ca54bf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/mode/static/manager.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,9 @@ func registerControllers(
281281
{
282282
objectType: &gatewayv1.GatewayClass{},
283283
options: []controller.Option{
284-
controller.WithK8sPredicate(k8spredicate.GenerationChangedPredicate{}),
285-
controller.WithK8sPredicate(predicate.GatewayClassPredicate{ControllerName: cfg.GatewayCtlrName}),
284+
controller.WithK8sPredicate(k8spredicate.And(
285+
k8spredicate.GenerationChangedPredicate{},
286+
predicate.GatewayClassPredicate{ControllerName: cfg.GatewayCtlrName})),
286287
},
287288
},
288289
{

0 commit comments

Comments
 (0)