Skip to content

Commit

Permalink
[backport] gateway2: reconcile on HTTPRoute annotation change (#10521)
Browse files Browse the repository at this point in the history
Signed-off-by: Shashank Ram <shashank.ram@solo.io>
  • Loading branch information
shashankram authored Dec 19, 2024
1 parent b84a4b2 commit a24ffd4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 7 additions & 0 deletions changelog/v1.17.19/httproute-annotation.yaml
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 1 addition & 3 deletions projects/gateway2/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ func NewBaseGatewayController(ctx context.Context, cfg GatewayConfig) error {
controllerBuilder.addVhOptIndexes,
controllerBuilder.addGwParamsIndexes,
)

}

func run(ctx context.Context, funcs ...func(ctx context.Context) error) error {
Expand Down Expand Up @@ -258,7 +257,7 @@ func (c *controllerBuilder) watchGwClass(ctx context.Context) error {

func (c *controllerBuilder) watchHttpRoute(ctx context.Context) error {
err := ctrl.NewControllerManagedBy(c.cfg.Mgr).
WithEventFilter(predicate.GenerationChangedPredicate{}).
WithEventFilter(predicate.Or(predicate.GenerationChangedPredicate{}, predicate.AnnotationChangedPredicate{})).
For(&apiv1.HTTPRoute{}).
Complete(reconcile.Func(c.reconciler.ReconcileHttpRoutes))
if err != nil {
Expand Down Expand Up @@ -414,7 +413,6 @@ func (r *controllerReconciler) ReconcileHttpRoutes(ctx context.Context, req ctrl
}

func (r *controllerReconciler) ReconcileReferenceGrants(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {

// reconcile all things?!
r.kick(ctx)
return ctrl.Result{}, nil
Expand Down

0 comments on commit a24ffd4

Please sign in to comment.