Skip to content

Commit

Permalink
chore(MeshHTTPRoute): add redirect filter (#5745)
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Beaumont <[email protected]>
  • Loading branch information
michaelbeaumont authored Jan 19, 2023
1 parent 5b08123 commit 4bb9d2c
Show file tree
Hide file tree
Showing 16 changed files with 523 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,49 @@ spec:
- name
x-kubernetes-list-type: map
type: object
requestRedirect:
properties:
hostname:
description: "PreciseHostname is the fully
qualified domain name of a network host.
This matches the RFC 1123 definition of
a hostname with 1 notable exception that
numeric IP addresses are not allowed.
\n Note that as per RFC1035 and RFC1123,
a *label* must consist of lower case alphanumeric
characters or '-', and must start and
end with an alphanumeric character. No
other punctuation is allowed."
maxLength: 253
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
port:
description: Port is the port to be used
in the value of the `Location` header
in the response. When empty, port (if
specified) of the request is used.
format: int32
maximum: 65535
minimum: 1
type: integer
scheme:
enum:
- http
- https
type: string
statusCode:
default: 302
description: StatusCode is the HTTP status
code to be used in response.
enum:
- 301
- 302
- 303
- 307
- 308
type: integer
type: object
responseHeaderModifier:
description: Only one action is supported per
header name. Configuration to set or add multiple
Expand Down Expand Up @@ -1036,6 +1079,7 @@ spec:
enum:
- RequestHeaderModifier
- ResponseHeaderModifier
- RequestRedirect
type: string
required:
- type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,49 @@ spec:
- name
x-kubernetes-list-type: map
type: object
requestRedirect:
properties:
hostname:
description: "PreciseHostname is the fully
qualified domain name of a network host.
This matches the RFC 1123 definition of
a hostname with 1 notable exception that
numeric IP addresses are not allowed.
\n Note that as per RFC1035 and RFC1123,
a *label* must consist of lower case alphanumeric
characters or '-', and must start and
end with an alphanumeric character. No
other punctuation is allowed."
maxLength: 253
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
port:
description: Port is the port to be used
in the value of the `Location` header
in the response. When empty, port (if
specified) of the request is used.
format: int32
maximum: 65535
minimum: 1
type: integer
scheme:
enum:
- http
- https
type: string
statusCode:
default: 302
description: StatusCode is the HTTP status
code to be used in response.
enum:
- 301
- 302
- 303
- 307
- 308
type: integer
type: object
responseHeaderModifier:
description: Only one action is supported per
header name. Configuration to set or add multiple
Expand Down Expand Up @@ -1036,6 +1079,7 @@ spec:
enum:
- RequestHeaderModifier
- ResponseHeaderModifier
- RequestRedirect
type: string
required:
- type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,49 @@ spec:
- name
x-kubernetes-list-type: map
type: object
requestRedirect:
properties:
hostname:
description: "PreciseHostname is the fully
qualified domain name of a network host.
This matches the RFC 1123 definition of
a hostname with 1 notable exception that
numeric IP addresses are not allowed.
\n Note that as per RFC1035 and RFC1123,
a *label* must consist of lower case alphanumeric
characters or '-', and must start and
end with an alphanumeric character. No
other punctuation is allowed."
maxLength: 253
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
port:
description: Port is the port to be used
in the value of the `Location` header
in the response. When empty, port (if
specified) of the request is used.
format: int32
maximum: 65535
minimum: 1
type: integer
scheme:
enum:
- http
- https
type: string
statusCode:
default: 302
description: StatusCode is the HTTP status
code to be used in response.
enum:
- 301
- 302
- 303
- 307
- 308
type: integer
type: object
responseHeaderModifier:
description: Only one action is supported per
header name. Configuration to set or add multiple
Expand Down Expand Up @@ -1168,6 +1211,7 @@ spec:
enum:
- RequestHeaderModifier
- ResponseHeaderModifier
- RequestRedirect
type: string
required:
- type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,49 @@ spec:
- name
x-kubernetes-list-type: map
type: object
requestRedirect:
properties:
hostname:
description: "PreciseHostname is the fully
qualified domain name of a network host.
This matches the RFC 1123 definition of
a hostname with 1 notable exception that
numeric IP addresses are not allowed.
\n Note that as per RFC1035 and RFC1123,
a *label* must consist of lower case alphanumeric
characters or '-', and must start and
end with an alphanumeric character. No
other punctuation is allowed."
maxLength: 253
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
port:
description: Port is the port to be used
in the value of the `Location` header
in the response. When empty, port (if
specified) of the request is used.
format: int32
maximum: 65535
minimum: 1
type: integer
scheme:
enum:
- http
- https
type: string
statusCode:
default: 302
description: StatusCode is the HTTP status
code to be used in response.
enum:
- 301
- 302
- 303
- 307
- 308
type: integer
type: object
responseHeaderModifier:
description: Only one action is supported per
header name. Configuration to set or add multiple
Expand Down Expand Up @@ -1056,6 +1099,7 @@ spec:
enum:
- RequestHeaderModifier
- ResponseHeaderModifier
- RequestRedirect
type: string
required:
- type
Expand Down
44 changes: 44 additions & 0 deletions app/kumactl/cmd/install/testdata/install-crds.all.golden.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2152,6 +2152,49 @@ spec:
- name
x-kubernetes-list-type: map
type: object
requestRedirect:
properties:
hostname:
description: "PreciseHostname is the fully
qualified domain name of a network host.
This matches the RFC 1123 definition of
a hostname with 1 notable exception that
numeric IP addresses are not allowed.
\n Note that as per RFC1035 and RFC1123,
a *label* must consist of lower case alphanumeric
characters or '-', and must start and
end with an alphanumeric character. No
other punctuation is allowed."
maxLength: 253
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
port:
description: Port is the port to be used
in the value of the `Location` header
in the response. When empty, port (if
specified) of the request is used.
format: int32
maximum: 65535
minimum: 1
type: integer
scheme:
enum:
- http
- https
type: string
statusCode:
default: 302
description: StatusCode is the HTTP status
code to be used in response.
enum:
- 301
- 302
- 303
- 307
- 308
type: integer
type: object
responseHeaderModifier:
description: Only one action is supported per
header name. Configuration to set or add multiple
Expand Down Expand Up @@ -2207,6 +2250,7 @@ spec:
enum:
- RequestHeaderModifier
- ResponseHeaderModifier
- RequestRedirect
type: string
required:
- type
Expand Down
Loading

0 comments on commit 4bb9d2c

Please sign in to comment.