From 1bb07f5df63882ddbf7e6a5e3ffcf10722350d4f Mon Sep 17 00:00:00 2001 From: Shashank Ram <21697719+shashankram@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:04:40 -0800 Subject: [PATCH] gateway2: reconcile on HTTPRoute annotation change (#10520) Signed-off-by: Shashank Ram --- changelog/v1.19.0-beta3/httproute-annotation.yaml | 7 +++++++ projects/gateway2/controller/controller.go | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 changelog/v1.19.0-beta3/httproute-annotation.yaml diff --git a/changelog/v1.19.0-beta3/httproute-annotation.yaml b/changelog/v1.19.0-beta3/httproute-annotation.yaml new file mode 100644 index 00000000000..3abd93ebcd4 --- /dev/null +++ b/changelog/v1.19.0-beta3/httproute-annotation.yaml @@ -0,0 +1,7 @@ +changelog: + - type: FIX + issueLink: https://github.com/solo-io/solo-projects/issues/7514 + resolvesIssue: false + description: | + Route delegation makes use of delegation.gateway.solo.io/* + annotations, so changes to annotations should reconcile HTTPRoutes. diff --git a/projects/gateway2/controller/controller.go b/projects/gateway2/controller/controller.go index c82861ece0c..98c4e410665 100644 --- a/projects/gateway2/controller/controller.go +++ b/projects/gateway2/controller/controller.go @@ -311,7 +311,7 @@ func (c *controllerBuilder) watchCustomResourceDefinitions(_ context.Context) er func (c *controllerBuilder) watchHttpRoute(_ context.Context) error { return ctrl.NewControllerManagedBy(c.cfg.Mgr). - WithEventFilter(predicate.GenerationChangedPredicate{}). + WithEventFilter(predicate.Or(predicate.GenerationChangedPredicate{}, predicate.AnnotationChangedPredicate{})). For(&apiv1.HTTPRoute{}). Complete(reconcile.Func(c.reconciler.ReconcileHttpRoutes)) }