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

internal/dag: Implement GatewayAllow for TLSRoutes #3735

Merged
merged 2 commits into from
May 27, 2021

Conversation

stevesloka
Copy link
Member

Fixes #3695

Signed-off-by: Steve Sloka slokas@vmware.com

@stevesloka stevesloka requested a review from a team as a code owner May 27, 2021 14:32
@stevesloka stevesloka requested review from danehans and youngnick and removed request for a team May 27, 2021 14:32
@stevesloka
Copy link
Member Author

I'm going to follow up with some integration tests which would be nice to route through the API server properly.

@@ -707,7 +707,7 @@ func TestDAGInsertGatewayAPI(t *testing.T) {
},
Spec: gatewayapi_v1alpha1.HTTPRouteSpec{
Gateways: &gatewayapi_v1alpha1.RouteGateways{
Allow: gatewayAllowTypePtr(gatewayapi_v1alpha1.GatewayAllowAll),
Allow: gatewayAllowTypePtr(gatewayapi_v1alpha1.GatewayAllowSameNamespace),
Copy link
Member Author

@stevesloka stevesloka May 27, 2021

Choose a reason for hiding this comment

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

This was wrong previously and should have been "SameNamespace". The result is still correct, but just fixing up in this PR since it wasn't really testing the right thing.

Copy link
Member Author

@stevesloka stevesloka May 27, 2021

Choose a reason for hiding this comment

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

Also, I think we could DRY these tests up, there's a lot of duplication. 😢 But maybe a future thing.

@codecov
Copy link

codecov bot commented May 27, 2021

Codecov Report

Merging #3735 (42bbc7c) into main (287b9ae) will decrease coverage by 0.05%.
The diff coverage is 44.44%.

❗ Current head 42bbc7c differs from pull request most recent head 16c39e1. Consider uploading reports for the commit 16c39e1 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3735      +/-   ##
==========================================
- Coverage   75.72%   75.67%   -0.06%     
==========================================
  Files         107      107              
  Lines        7297     7302       +5     
==========================================
  Hits         5526     5526              
- Misses       1650     1654       +4     
- Partials      121      122       +1     
Impacted Files Coverage Δ
internal/dag/gatewayapi_processor.go 92.12% <44.44%> (-1.61%) ⬇️

@stevesloka
Copy link
Member Author

My logic is broken somewhere causing the TLSRoute to be kicked out. Digging into that now.

Fixes projectcontour#3695

Signed-off-by: Steve Sloka <slokas@vmware.com>
Copy link
Member

@skriss skriss left a comment

Choose a reason for hiding this comment

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

LGTM

@stevesloka
Copy link
Member Author

I didn't update the _integration tests, probably need fixes. Do we care at this point since we're trashing those?

@sunjayBhatia
Copy link
Member

I didn't update the _integration tests, probably need fixes. Do we care at this point since we're trashing those?

idk if the _integration removal will make it in before 1.16 so just to keep the pipeline green, maybe fix or remove the test assuming it is mirrored into e2e

Copy link
Member

@sunjayBhatia sunjayBhatia left a comment

Choose a reason for hiding this comment

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

LGTM pending CI (removal of _integration test or adding missing allow all selector)

Signed-off-by: Steve Sloka <slokas@vmware.com>
@stevesloka stevesloka merged commit 507dd96 into projectcontour:main May 27, 2021
@stevesloka stevesloka deleted the gatewayallowTLSRoute branch May 27, 2021 18:59
@skriss skriss mentioned this pull request Jul 30, 2021
4 tasks
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.

Implement GatewayAllow in TLSRoute
3 participants