Skip to content
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

feat(httproute): add ReferenceGrant watch #3759

Merged
merged 4 commits into from
Mar 27, 2023

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented Mar 17, 2023

What this PR does / why we need it:

This PR adds a watch for ReferenceGrant in HTTPRouteController.

With this change when a ReferenceGrant is deleted, the HTTPRoute gets its status update with a condition: type: ResolvedRefs, reason: RefNotPermitted and status set to "False".

Which issue this PR fixes:

Related: #3289

Apart from the above this will also make us pass this conformance test (yet to merged): kubernetes-sigs/gateway-api#1853

@pmalek pmalek added the area/gateway-api Relating to upstream Kubernetes SIG Networking Gateway API label Mar 17, 2023
@pmalek pmalek self-assigned this Mar 17, 2023
@pmalek pmalek changed the title feat(httproute): add ReferenceGrant watch feat(httproute): add ReferenceGrant watch Mar 17, 2023
@pmalek pmalek force-pushed the httproute-controller-add-reference-grant-watch branch 4 times, most recently from ac5a4d7 to 7d6f636 Compare March 20, 2023 18:04
@codecov
Copy link

codecov bot commented Mar 20, 2023

Codecov Report

Patch coverage: 71.2% and project coverage change: +58.9 🎉

Comparison is base (6b00bfa) 0.0% compared to head (3fd408d) 58.9%.

❗ Current head 3fd408d differs from pull request most recent head 1fccf4d. Consider uploading reports for the commit 1fccf4d to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           main   #3759      +/-   ##
=======================================
+ Coverage      0   58.9%   +58.9%     
=======================================
  Files         0     134     +134     
  Lines         0   15751   +15751     
=======================================
+ Hits          0    9291    +9291     
- Misses        0    5825    +5825     
- Partials      0     635     +635     
Impacted Files Coverage Δ
...ternal/controllers/gateway/httproute_controller.go 57.2% <61.2%> (ø)
internal/controllers/gateway/gateway_utils.go 44.1% <100.0%> (ø)
internal/controllers/gateway/route_utils.go 75.0% <100.0%> (ø)
internal/util/builder/httpbackendref.go 76.4% <100.0%> (ø)

... and 130 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pmalek pmalek marked this pull request as ready for review March 20, 2023 18:39
@pmalek pmalek requested a review from a team as a code owner March 20, 2023 18:39
randmonkey
randmonkey previously approved these changes Mar 21, 2023
@pmalek pmalek added the do not merge let the author merge this, don't merge for them. label Mar 21, 2023
@pmalek
Copy link
Member Author

pmalek commented Mar 21, 2023

Actually let me add a test for that

@pmalek pmalek force-pushed the httproute-controller-add-reference-grant-watch branch from 7d6f636 to bdb14e7 Compare March 21, 2023 19:34
@pull-request-size pull-request-size bot added size/L and removed size/M labels Mar 21, 2023
@pmalek pmalek force-pushed the httproute-controller-add-reference-grant-watch branch from bdb14e7 to 685e2bf Compare March 22, 2023 10:27
@pmalek pmalek force-pushed the httproute-controller-add-reference-grant-watch branch from 685e2bf to a6a8f0e Compare March 22, 2023 10:28
@pmalek pmalek removed the do not merge let the author merge this, don't merge for them. label Mar 22, 2023
@pmalek pmalek force-pushed the httproute-controller-add-reference-grant-watch branch 3 times, most recently from 9d18ca3 to 667bc78 Compare March 22, 2023 12:32
@pmalek pmalek force-pushed the httproute-controller-add-reference-grant-watch branch 4 times, most recently from 15959ec to 79b8782 Compare March 22, 2023 13:24
@pmalek pmalek force-pushed the httproute-controller-add-reference-grant-watch branch from 79b8782 to 76b31e1 Compare March 22, 2023 13:51
@pmalek pmalek force-pushed the httproute-controller-add-reference-grant-watch branch 2 times, most recently from d3de5a2 to db23878 Compare March 22, 2023 14:14
@pmalek pmalek force-pushed the httproute-controller-add-reference-grant-watch branch from db23878 to f1660f7 Compare March 22, 2023 14:26
@pmalek pmalek added this to the KIC v2.9.0 milestone Mar 22, 2023
mlavacca
mlavacca previously approved these changes Mar 22, 2023
Copy link
Contributor

@rainest rainest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My own merge contains a minor conflict fix in CHANGELOG.md. My kingdom for some sort of automation around that to just say "always accept both for this file", but whatever. Re-approving based on the previous approval.

@rainest rainest enabled auto-merge (squash) March 27, 2023 20:45
@rainest rainest merged commit d11292b into main Mar 27, 2023
@rainest rainest deleted the httproute-controller-add-reference-grant-watch branch March 27, 2023 21:14
@github-actions
Copy link

The backport to release/2.9.x failed:

The process '/usr/bin/git' failed with exit code 1

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/2.9.x release/2.9.x
# Navigate to the new working tree
cd .worktrees/backport-release/2.9.x
# Create a new branch
git switch --create backport-3759-to-release/2.9.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d11292b10fd5366ae5f6b4e3083e2b05112d6d00
# Push it to GitHub
git push --set-upstream origin backport-3759-to-release/2.9.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/2.9.x

Then, create a pull request where the base branch is release/2.9.x and the compare/head branch is backport-3759-to-release/2.9.x.

github-actions bot pushed a commit that referenced this pull request Mar 27, 2023
Co-authored-by: Grzegorz Burzyński <czeslavo@gmail.com>
Co-authored-by: Travis Raines <571832+rainest@users.noreply.github.com>
(cherry picked from commit d11292b)
rainest pushed a commit that referenced this pull request Mar 27, 2023
Co-authored-by: Grzegorz Burzyński <czeslavo@gmail.com>
Co-authored-by: Travis Raines <571832+rainest@users.noreply.github.com>
(cherry picked from commit d11292b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gateway-api Relating to upstream Kubernetes SIG Networking Gateway API backport release/2.9.x size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants