generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Istio provider: translate istio rewrite clause to HTTPRouteFilterURLR…
…ewrite.
- Loading branch information
1 parent
f151372
commit ce7e0bb
Showing
9 changed files
with
278 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ spec: | |
- destination: | ||
host: mongo.backup.svc.cluster.local | ||
port: | ||
number: 5555 | ||
number: 5555 |
58 changes: 58 additions & 0 deletions
58
pkg/i2gw/providers/istio/fixtures/input/6-virtualservice-http-rewrite.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
apiVersion: networking.istio.io/v1beta1 | ||
kind: VirtualService | ||
metadata: | ||
namespace: test | ||
name: virtualservice | ||
spec: | ||
gateways: | ||
- "my-gateway" | ||
hosts: | ||
- reviews.prod.svc.cluster.local | ||
http: | ||
- name: "test" | ||
match: | ||
- uri: | ||
prefix: "/wpcatalog" | ||
- uri: | ||
exact: "/consumercatalog" | ||
- uri: | ||
regex: "/catalog[0-9]+" | ||
rewrite: | ||
uri: "/newcatalog" | ||
# authority & uriRegexRewrite are ignored | ||
authority: test | ||
uriRegexRewrite: | ||
match: pattern | ||
rewrite: new-pattern | ||
route: | ||
- destination: | ||
host: reviews.prod.svc.cluster.local | ||
subset: v2 | ||
--- | ||
apiVersion: networking.istio.io/v1beta1 | ||
kind: VirtualService | ||
metadata: | ||
namespace: test | ||
name: no-uri-matches | ||
spec: | ||
gateways: | ||
- "my-gateway" | ||
hosts: | ||
- reviews.test.svc.cluster.local | ||
http: | ||
- name: "route" | ||
match: | ||
- headers: | ||
h1: | ||
exact: v1 | ||
rewrite: | ||
uri: "/newcatalog" | ||
# authority & uriRegexRewrite are ignored | ||
authority: test | ||
uriRegexRewrite: | ||
match: pattern | ||
rewrite: new-pattern | ||
route: | ||
- destination: | ||
host: reviews.test.svc.cluster.local | ||
subset: v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,3 @@ spec: | |
- name: reviews | ||
namespace: test | ||
weight: 0 | ||
|
Oops, something went wrong.