-
Notifications
You must be signed in to change notification settings - Fork 589
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
fix: add check for existence of HTTPRoute in KongUpstreamPolicy controller #5780
fix: add check for existence of HTTPRoute in KongUpstreamPolicy controller #5780
Conversation
106b560
to
0b4e91a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5780 +/- ##
=======================================
- Coverage 73.9% 73.9% -0.1%
=======================================
Files 176 176
Lines 18187 18185 -2
=======================================
- Hits 13456 13452 -4
- Misses 3734 3736 +2
Partials 997 997 ☔ View full report in Codecov by Sentry. |
…amPolicy needing to update ancestor status
0b4e91a
to
ea72a43
Compare
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.
I think we should add an envtest in which we ensure that KongUpstreamPolicies used with Services and Ingress work as expected when Gateway API CRDs are not installed. I'm afraid this could still be a problem because of this HTTPRoute list in the original reconciler.
971593a
to
20b9b6e
Compare
Removed the extra dynamic controller and added a |
internal/controllers/configuration/kongupstreampolicy_controller.go
Outdated
Show resolved
Hide resolved
internal/controllers/configuration/kongupstreampolicy_controller.go
Outdated
Show resolved
Hide resolved
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/3.1.x release/3.1.x
# Navigate to the new working tree
cd .worktrees/backport-release/3.1.x
# Create a new branch
git switch --create backport-5780-to-release/3.1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 30a2991056044636804da46c7847b44e9497de50
# Push it to GitHub
git push --set-upstream origin backport-5780-to-release/3.1.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/3.1.x Then, create a pull request where the |
…oller (#5780) * add HTTPRoute controller for watching HTTPRoute to enqueue KongUpstreamPolicy needing to update ancestor status * add CHANGELOG * do not use dynamic CRD controller and and envtest cases * Apply suggestions from code review --------- Co-authored-by: Grzegorz Burzyński <czeslavo@gmail.com> (cherry picked from commit 30a2991)
…oller (#5780) * add HTTPRoute controller for watching HTTPRoute to enqueue KongUpstreamPolicy needing to update ancestor status * add CHANGELOG * do not use dynamic CRD controller and and envtest cases * Apply suggestions from code review --------- Co-authored-by: Grzegorz Burzyński <czeslavo@gmail.com> (cherry picked from commit 30a2991)
… KongUpstreamPolicy controller (#5806) * fix: add check for existence of HTTPRoute in KongUpstreamPolicy controller (#5780) * add HTTPRoute controller for watching HTTPRoute to enqueue KongUpstreamPolicy needing to update ancestor status * add CHANGELOG * do not use dynamic CRD controller and and envtest cases * Apply suggestions from code review --------- Co-authored-by: Grzegorz Burzyński <czeslavo@gmail.com> (cherry picked from commit 30a2991) * Update CHANGELOG.md --------- Co-authored-by: Tao Yi <tao.yi@konghq.com>
What this PR does / why we need it:
Add check of existence of
HTTPRoute
s inKongUpstreamPolicy
controller and only enable the ancestor status update of relatedKongUpstreamPolicy
whenHTTPRoute
CRD exists before KIC starts.Removes the dependency of
HTTPRoute
ofKongUpstreamPolicy
.Which issue this PR fixes:
fixes #5729
Special notes for your reviewer:
We may need to backport it to 3.1.x.
PR Readiness Checklist:
Complete these before marking the PR as
ready to review
:CHANGELOG.md
release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR