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

use ADS cache to ensure the rule order #2634

Merged
merged 1 commit into from
Feb 17, 2024
Merged

Conversation

zetaab
Copy link
Contributor

@zetaab zetaab commented Feb 16, 2024

What type of PR is this?
fix: modifies gateway to use ADS mode

What this PR does / why we need it:

This pr will ensure that the delta watches are sent in correct order (see https://github.com/envoyproxy/go-control-plane/blob/main/pkg/cache/v3/simple.go#L301-L304)

Which issue(s) this PR fixes:

Fixes #2521

Like mentioned in issue, after this modification everything works great! and I can run my go script to verify it:

% go run main.go 
httproute.gateway.networking.k8s.io/echoserver-ext configured
2024/02/16 23:41:06 fetching code
securitypolicy.gateway.envoyproxy.io/echoserver-ext-oidc created
2024/02/16 23:41:06 fetching code
2024/02/16 23:41:07 fetching code
securitypolicy.gateway.envoyproxy.io "echoserver-ext-oidc" deleted
httproute.gateway.networking.k8s.io "echoserver-ext" deleted
httproute.gateway.networking.k8s.io/echoserver-ext created
2024/02/16 23:41:10 fetching code
2024/02/16 23:41:11 fetching code
securitypolicy.gateway.envoyproxy.io/echoserver-ext-oidc created
2024/02/16 23:41:11 fetching code
2024/02/16 23:41:12 fetching code
securitypolicy.gateway.envoyproxy.io "echoserver-ext-oidc" deleted
httproute.gateway.networking.k8s.io "echoserver-ext" deleted
First failure count: 0
Second failure count: 0
Total executions: 2

@zetaab zetaab requested a review from a team as a code owner February 16, 2024 21:44
@zetaab zetaab changed the title use ads cache to ensure the rule order use ADS cache to ensure the rule order Feb 16, 2024
Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

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

wow, thank you for finding and fixing this !

@arkodg arkodg requested review from a team February 16, 2024 22:24
Copy link

codecov bot commented Feb 16, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (cc88e9c) 63.54% compared to head (28c1149) 63.49%.

Files Patch % Lines
internal/xds/server/runner/runner.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2634      +/-   ##
==========================================
- Coverage   63.54%   63.49%   -0.06%     
==========================================
  Files         119      119              
  Lines       19236    19236              
==========================================
- Hits        12223    12213      -10     
- Misses       6198     6207       +9     
- Partials      815      816       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@shawnh2 shawnh2 left a comment

Choose a reason for hiding this comment

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

lgtm thanks

@arkodg arkodg merged commit f7df0e2 into envoyproxy:main Feb 17, 2024
18 of 19 checks passed
@zetaab zetaab deleted the useads branch February 17, 2024 05:03
vixns pushed a commit to vixns/gateway that referenced this pull request Feb 18, 2024
use ads cache to ensure the rule order

Signed-off-by: Jesse Haka <[email protected]>
Signed-off-by: Stéphane Cottin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

envoyproxy needs restart before securitypolicy takes action
3 participants