-
Notifications
You must be signed in to change notification settings - Fork 27
feat(hybridgateway): rework generated resources lifecycle #2656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
fgiudici
wants to merge
21
commits into
main
Choose a base branch
from
fg/2520-hg-generate_resources_lifecycle
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,632
−233
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5ae8d61 to
80b4562
Compare
34ba2c0 to
733e6a4
Compare
mlavacca
reviewed
Nov 21, 2025
|
|
||
| // Remove finalizer | ||
| controllerutil.RemoveFinalizer(obj, routeconst.RouteFinalizer) | ||
| if err := r.Update(ctx, obj); err != nil { |
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aditto about Update
it also performs (debug) logging. Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
i.e., hybrid-routes Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
733e6a4 to
1610db1
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
This PR reworks the life-cycle of the Kong resources generated by the Hybrid Gateway controller.
With the introduction of #2566 the Kong resources generated from
HTTPRoutes can be shared by differentHTTPRoutes.This requires to drop the single Owner reference in the generated Kong resources in favor of a multi-ownership strategy.
This PR drops the Owner references from the generated resources and adds a tracking annotation where all the
HTTPRoutes sharing the resource will add themselves.A generated resource is removed only when no more
HTTPRoutes appear in the tracking annotation.The tracking annotation is:
gateway-operator.konghq.com/hybrid-routesWhich issue this PR fixes
Fixes #2683
Special notes for your reviewer:
The current code has some duplication that can be avoided with better factorization.
This is left for #2684 and the plan is to address it once all the functionality is there (i.e., after #2685).
PR Readiness Checklist:
Complete these before marking the PR as
ready to review:CHANGELOG.mdrelease notes have been updated to reflect significant changes