File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1051,6 +1051,7 @@ Possible values:
1051
1051
1052
1052
- A single path, such as "/", to turn any path into "/"
1053
1053
- Two parameters. A regular expression to match and a path to replace it with.
1054
+ - Multiline annotation is split into more rewrite rules.
1054
1055
1055
1056
Example :
1056
1057
@@ -1059,6 +1060,12 @@ path-rewrite: "/" # replace all paths with /
1059
1060
path-rewrite: (.*) /foo\1 # add the prefix /foo... "/bar?q=1" into "/foo/bar?q=1"
1060
1061
path-rewrite: ([^?]*)(\? (.*))? \1 /foo\2 # add the suffix /foo ... "/bar?q=1" into "/bar/foo?q=1"
1061
1062
path-rewrite: /foo/(.*) /\1 # strip /foo ... "/foo/bar?q=1" into "/bar?q=1"
1063
+ # strip /foo ... "/foo/bar?q=1" into "/bar?q=1" and replace "/bar/*" with "/baz/*"
1064
+ # with multiline (using ` |`) annotation
1065
+ path-rewrite : |
1066
+ /foo/(.*) /\1
1067
+ /bar/(.*) /baz/\1
1068
+
1062
1069
` ` `
1063
1070
1064
1071
<p align='right'><a href='#available-annotations'>:arrow_up_small: back to top</a></p>
Original file line number Diff line number Diff line change @@ -1105,6 +1105,7 @@ annotations:
1105
1105
values :
1106
1106
- A single path, such as "/", to turn any path into "/"
1107
1107
- Two parameters. A regular expression to match and a path to replace it with.
1108
+ - Multiline annotation is split into more rewrite rules.
1108
1109
applies_to :
1109
1110
- configmap
1110
1111
- ingress
@@ -1114,6 +1115,12 @@ annotations:
1114
1115
- ' path-rewrite: (.*) /foo\1 # add the prefix /foo... "/bar?q=1" into "/foo/bar?q=1"'
1115
1116
- ' path-rewrite: ([^?]*)(\?(.*))? \1/foo\2 # add the suffix /foo ... "/bar?q=1" into "/bar/foo?q=1"'
1116
1117
- ' path-rewrite: /foo/(.*) /\1 # strip /foo ... "/foo/bar?q=1" into "/bar?q=1"'
1118
+ - |
1119
+ # strip /foo ... "/foo/bar?q=1" into "/bar?q=1" and replace "/bar/*" with "/baz/*"
1120
+ # with multiline (using `|`) annotation
1121
+ path-rewrite: |
1122
+ /foo/(.*) /\1
1123
+ /bar/(.*) /baz/\1
1117
1124
- title : pod-maxconn
1118
1125
type : number
1119
1126
group : maximum-concurrent-backend-connections
You can’t perform that action at this time.
0 commit comments