-
Notifications
You must be signed in to change notification settings - Fork 433
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
Expose most_specific_header_mutations_wins #8692
Expose most_specific_header_mutations_wins #8692
Conversation
Visit the preview URL for this PR (updated for commit 263d9c2): https://gloo-edge--pr8692-feat-expose-most-spe-ju7o68iu.web.app (expires Wed, 27 Sep 2023 18:42:14 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 77c2b86e287749579b7ff9cadb81e099042ef677 |
Issues linked to changelog: |
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 a great use case for a set of e2e tests which show how configuration at the route/vs level bheavior differently based on this setting (ie when are heads actually appended vs overwritten). Since this functionality depends on multiple APIs in the data plane, unit tests alone won't be able to verify this.
The test could then be used as the source of truth for our docs.
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.
Looking good!
changelog/v1.16.0-beta10/expose-most-specific-header-mutations-wins.yaml
Outdated
Show resolved
Hide resolved
docs/content/guides/traffic_management/request_processing/append_remove_headers/_index.md
Outdated
Show resolved
Hide resolved
docs/content/guides/traffic_management/request_processing/append_remove_headers/_index.md
Outdated
Show resolved
Hide resolved
docs/content/guides/traffic_management/request_processing/append_remove_headers/_index.md
Outdated
Show resolved
Hide resolved
docs/content/guides/traffic_management/request_processing/append_remove_headers/_index.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Art <artberger@users.noreply.github.com>
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.
🚀
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.
Great work! I confirmed that the tests fail when I remove the translation code, and also when I adjust the value of this field
* add most_specific_header_mutations_wins route config option * translate and add MostSpecificHeaderMutationsWins to translator_test * add changelog * add skipCI-kube-tests:true directive * add header manipulation order e2e tests and expose routeTable in testContext's testClients * codegen * Add section in docs to include mostSpecificHeaderMutationsWins * remove skipCI-kube-tests:true directive * review comment updates * Apply suggestions from code review Co-authored-by: Art <artberger@users.noreply.github.com> * review comment updates pt 2 --------- Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Art <artberger@users.noreply.github.com>
* add most_specific_header_mutations_wins route config option * translate and add MostSpecificHeaderMutationsWins to translator_test * add changelog * add skipCI-kube-tests:true directive * add header manipulation order e2e tests and expose routeTable in testContext's testClients * codegen * Add section in docs to include mostSpecificHeaderMutationsWins * remove skipCI-kube-tests:true directive * review comment updates * Apply suggestions from code review Co-authored-by: Art <artberger@users.noreply.github.com> * review comment updates pt 2 --------- Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Art <artberger@users.noreply.github.com>
…on (#8704) * Use appendAction for translated HeaderValueOptions (#8678) * update header value options to convert append to envoy v3's append action * update tests to expect appendAction * remove focused test * Update append description * add changelog * add extra informatnion on header append/removal docs * Apply suggestions from code review Co-authored-by: Art <artberger@users.noreply.github.com> * Update docs/content/guides/traffic_management/request_processing/append_remove_headers/_index.md Co-authored-by: Art <artberger@users.noreply.github.com> * Update docs/content/guides/traffic_management/request_processing/append_remove_headers/_index.md Co-authored-by: Art <artberger@users.noreply.github.com> --------- Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Art <artberger@users.noreply.github.com> * update changelog * Expose most_specific_header_mutations_wins (#8692) * add most_specific_header_mutations_wins route config option * translate and add MostSpecificHeaderMutationsWins to translator_test * add changelog * add skipCI-kube-tests:true directive * add header manipulation order e2e tests and expose routeTable in testContext's testClients * codegen * Add section in docs to include mostSpecificHeaderMutationsWins * remove skipCI-kube-tests:true directive * review comment updates * Apply suggestions from code review Co-authored-by: Art <artberger@users.noreply.github.com> * review comment updates pt 2 --------- Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Art <artberger@users.noreply.github.com> * codegen * do not skip kube tests --------- Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Art <artberger@users.noreply.github.com>
…on (#8705) * Use appendAction for translated HeaderValueOptions (#8678) * update header value options to convert append to envoy v3's append action * update tests to expect appendAction * remove focused test * Update append description * add changelog * add extra informatnion on header append/removal docs * Apply suggestions from code review Co-authored-by: Art <artberger@users.noreply.github.com> * Update docs/content/guides/traffic_management/request_processing/append_remove_headers/_index.md Co-authored-by: Art <artberger@users.noreply.github.com> * Update docs/content/guides/traffic_management/request_processing/append_remove_headers/_index.md Co-authored-by: Art <artberger@users.noreply.github.com> --------- Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Art <artberger@users.noreply.github.com> * update changelog * Expose most_specific_header_mutations_wins (#8692) * add most_specific_header_mutations_wins route config option * translate and add MostSpecificHeaderMutationsWins to translator_test * add changelog * add skipCI-kube-tests:true directive * add header manipulation order e2e tests and expose routeTable in testContext's testClients * codegen * Add section in docs to include mostSpecificHeaderMutationsWins * remove skipCI-kube-tests:true directive * review comment updates * Apply suggestions from code review Co-authored-by: Art <artberger@users.noreply.github.com> * review comment updates pt 2 --------- Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Art <artberger@users.noreply.github.com> * codegen * remove ContainHeaderKeys from header tests * do not skip kube tests * add matcher suite test * add route table client to gateway --------- Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Art <artberger@users.noreply.github.com>
Description
API/Code changes
most_specific_header_mutation_wins
in RouteConfigurations.Docs changes
Context
Testing steps
Notice only the VS header (
VSORIGIN
) is in the headerx-frame-options
. This is because we haveappend: false
on the header, therefore it is set to overwrite any headers that came before.Edit the gateway resource to include
spec.routeOptions.mostSpecificHeaderMutationsWins: true
field.Notice that now, only the Route header (
RTORIGIN
) is in the headerx-frame-options
. This is because our route config is now set to prioritize the most specific header mutation.Notes for reviewers
Checklist: