-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[gw api] add TLS and UDP listener tests. Fix bugs that were found from the tests #4250
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
[gw api] add TLS and UDP listener tests. Fix bugs that were found from the tests #4250
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zac-nixon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
8bdf40c
to
dfbdc73
Compare
dfbdc73
to
8e94684
Compare
if tg, exists := t.tgByResID[tgResID]; exists { | ||
fmt.Println("TG already exists. Returning cached version") |
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.
forgot to delete?
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.
ya
@@ -68,7 +68,7 @@ func Test_buildTargetGroupSpec(t *testing.T) { | |||
}, | |||
}, | |||
expectedTgSpec: elbv2model.TargetGroupSpec{ | |||
Name: "k8s-myrouten-myroute-d02da2803b", | |||
Name: "k8s-myrouten-myroute-8d8111f6ac", |
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.
what are those values, when do they need to be changed? is it because we added routeKind this time?
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.
yeah, it is because the kind is added to the name,. the value is just the hash of a bunch of fields.
}, | ||
targetPort: intstr80, | ||
healthCheckPort: intstrTrafficPort, | ||
tgProtocol: elbv2model.ProtocolHTTP, |
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.
why we changed from TCP protocol to HTTP?
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.
it's using the TG protocol, so testing out various protocols get translated correctly to TCP. Previously we were just using the service port.
var defaultProtocolToRouteKindMap = map[gwv1.ProtocolType][]RouteKind{ | ||
gwv1.TCPProtocolType: {TCPRouteKind}, | ||
gwv1.UDPProtocolType: {UDPRouteKind}, | ||
gwv1.TLSProtocolType: {TLSRouteKind, TCPRouteKind}, |
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 might missed it, other than the kindCheck, did we also check somewhere that TLS protocol can only use TCPRoute when mode=terminate
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.
good point. fixed.
/lgtm |
/lgtm |
Description
Adds new GW API E2E tests that validate UDP and TLS listener types. While developing these tests, they found multiple bugs that I have fixed.
Bugs fixed:
Next steps:
Checklist
README.md
, or thedocs
directory)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯