-
Notifications
You must be signed in to change notification settings - Fork 687
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
mapping: automatically include the l5d-dst-override header #1643
Conversation
Signed-off-by: Gabriel Linden Sagula <[email protected]>
Signed-off-by: Gabriel Linden Sagula <[email protected]>
Signed-off-by: Gabriel Linden Sagula <[email protected]>
Signed-off-by: Gabriel Linden Sagula <[email protected]>
Signed-off-by: Gabriel Linden Sagula <[email protected]>
Signed-off-by: Gabriel Linden Sagula <[email protected]>
Signed-off-by: Gabriel Linden Sagula <[email protected]>
Signed-off-by: Gabriel Linden Sagula <[email protected]>
Signed-off-by: Gabriel Linden Sagula <[email protected]>
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.
Two small things, and, uh, sorry for adding a merge conflict for you. 🙁 Looks good overall!!
Signed-off-by: Gabriel Linden Sagula <[email protected]>
Signed-off-by: Gabriel Linden Sagula <[email protected]>
Signed-off-by: Gabriel Linden Sagula <[email protected]>
…dor module Signed-off-by: Gabriel Linden Sagula <[email protected]>
Signed-off-by: Gabriel Linden Sagula <[email protected]>
@kflynn Thanks for the review. Please feel free to take another look. |
Signed-off-by: Gabriel Linden Sagula <[email protected]>
Signed-off-by: Gabriel Linden Sagula <[email protected]>
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.
Looks like some debugging code got left in a couple of places? But yeah, that ParsedService
thing looks good...
Signed-off-by: Gabriel Linden Sagula <[email protected]>
Signed-off-by: Gabriel Linden Sagula <[email protected]>
Signed-off-by: Gabriel Linden Sagula <[email protected]>
Signed-off-by: Gabriel Linden Sagula <[email protected]>
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'm going to go ahead and take this so we can get a test build out to, but there's a small change in logic that I think would be good to get in. Thanks!
else: | ||
add_linkerd_headers = module.get('add_linkerd_headers', None) | ||
if add_linkerd_headers is None: | ||
self["add_linkerd_headers"] = ir.ambassador_module.get('add_linkerd_headers', False) |
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.
This logic, I think, is wrong if add_linkerd_headers
is explicitly set to False
in the AuthService
when it's set to True
in the ambassador
Module
. The logic below for IRHTTPMapping
looks correct.
else: | ||
if 'add_linkerd_headers' in ir.ambassador_module and ir.ambassador_module.add_linkerd_headers is True: | ||
add_request_hdrs['l5d-dst-override'] = svc.hostname_port | ||
|
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 this is the logic that should be used in both Mapping
and AuthService
.
Description
Adds support for automatically include the l5d-dst-override header to all requests, including authorization (when configured).
Related Issues
#1594
#1578
Testing
KAT - mapping and auth tests