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

Rewrite prefix API flatten and auto_host_rewrite fix #1341

Merged
merged 14 commits into from
Oct 7, 2019

Conversation

kdorosh
Copy link
Contributor

@kdorosh kdorosh commented Oct 4, 2019

Solution

  • Flattens the prefix rewrite and host rewrite APIs.
  • Also moves auto_host_rewrite into the host rewrite oneof and removes it from the static upstream spec
    • This fixes confusing side-effects of static upstreams on the entire route
    • This allows configuring auto_host_rewrite on other upstream types (e.g., aws/azure) without relying on a static upstream to override the entire route config

Context

The current implementation of auto_host_rewrite had a confusing side-effect where a single static upstream on a route would set auto_host_rewrite for the entire route.

Envoy RouteAction docs for reference: https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/route/route.proto#route-routeaction (where all these rewrite actions live)

BOT NOTES:
resolves #1322

@solo-git-bot
Copy link

solo-git-bot bot commented Oct 4, 2019

Issues linked to changelog:
#1322
#1171

@kdorosh kdorosh changed the title Rewrite prefix API simplification Rewrite prefix API flatten and auto_host_rewrite fix Oct 4, 2019
@kdorosh kdorosh marked this pull request as ready for review October 4, 2019 22:05
@@ -75,4 +75,4 @@ func (resolvers Resolvers) Resolve(us *v1.Upstream) (*url.URL, error) {

// flow:
// upstream type: aws
// detector type: swagger (can only be used with upstreams that have a url that's resolavable)
// detector type: swagger (can only be used with upstreams that have a url that's resolvable)
Copy link
Member

Choose a reason for hiding this comment

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

cleaning up comments on fds 😍

@soloio-bulldozer soloio-bulldozer bot merged commit 8433946 into feature-rc1 Oct 7, 2019
@soloio-bulldozer soloio-bulldozer bot deleted the flatten_prefix_rewrite branch October 7, 2019 14:19
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.

2 participants