Skip to search

VirtualService

networking.istio.io / v1alpha3

apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: example
View raw schema
spec object
Configuration affecting label/content routing, sni routing, etc. See more details at: https://istio.io/docs/reference/config/networking/virtual-service.html
exportTo []string
A list of namespaces to which this virtual service is exported.
gateways []string
The names of gateways and sidecars that should apply these routes.
hosts []string
The destination hosts to which traffic is being sent.
http []object
An ordered list of route rules for HTTP traffic.
corsPolicy object
Cross-Origin Resource Sharing policy (CORS).
allowCredentials boolean
Indicates whether the caller is allowed to send the actual request (not the preflight) using credentials.
allowHeaders []string
List of HTTP headers that can be used when requesting the resource.
allowMethods []string
List of HTTP methods allowed to access the resource.
allowOrigin []string
allowOrigins []object
String patterns that match allowed origins.
exact string
prefix string
regex string
[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).
exposeHeaders []string
A list of HTTP headers that the browsers are allowed to access.
maxAge string
Specifies how long the results of a preflight request can be cached.
unmatchedPreflights string
Indicates whether preflight requests not matching the configured allowed origin shouldn't be forwarded to the upstream. Valid Options: FORWARD, IGNORE
enum: UNSPECIFIED, FORWARD, IGNORE
delegate object
Delegate is used to specify the particular VirtualService which can be used to define delegate HTTPRoute.
name string
Name specifies the name of the delegate VirtualService.
namespace string
Namespace specifies the namespace where the delegate VirtualService resides.
directResponse object
A HTTP rule can either return a direct_response, redirect or forward (default) traffic.
body object
Specifies the content of the response body.
bytes string
response body as base64 encoded bytes.
format: binary
string string
status integer required
Specifies the HTTP response status to be returned.
minimum: 0
maximum: 4.294967295e+09
fault object
Fault injection policy to apply on HTTP traffic at the client side.
abort object
Abort Http request attempts and return error codes back to downstream service, giving the impression that the upstream service is faulty.
grpcStatus string
GRPC status code to use to abort the request.
http2Error string
httpStatus integer
HTTP status code to use to abort the Http request.
format: int32
percentage object
Percentage of requests to be aborted with the error code provided.
value number
format: double
delay object
Delay requests before forwarding, emulating various failures such as network issues, overloaded upstream service, etc.
exponentialDelay string
fixedDelay string
Add a fixed delay before forwarding the request.
percent integer
Percentage of requests on which the delay will be injected (0-100).
format: int32
percentage object
Percentage of requests on which the delay will be injected.
value number
format: double
headers object
request object
add object
remove []string
set object
response object
add object
remove []string
set object
match []object
Match conditions to be satisfied for the rule to be activated.
authority object
HTTP Authority values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for [RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).
exact string
prefix string
regex string
[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).
gateways []string
Names of gateways where the rule should be applied.
headers object
The header keys must be lowercase and use hyphen as the separator, e.g.
ignoreUriCase boolean
Flag to specify whether the URI matching should be case-insensitive.
method object
HTTP Method values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for [RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).
exact string
prefix string
regex string
[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).
name string
The name assigned to a match.
port integer
Specifies the ports on the host that is being addressed.
minimum: 0
maximum: 4.294967295e+09
queryParams object
Query parameters for matching.
scheme object
URI Scheme values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for [RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).
exact string
prefix string
regex string
[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).
sourceLabels object
One or more labels that constrain the applicability of a rule to source (client) workloads with the given labels.
sourceNamespace string
Source namespace constraining the applicability of a rule to workloads in that namespace.
statPrefix string
The human readable prefix to use when emitting statistics for this route.
uri object
URI to match values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for [RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).
exact string
prefix string
regex string
[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).
withoutHeaders object
withoutHeader has the same syntax with the header, but has opposite meaning.
mirror object
Mirror HTTP traffic to a another destination in addition to forwarding the requests to the intended destination.
host string required
The name of a service from the service registry.
port object
Specifies the port on the host that is being addressed.
number integer
minimum: 0
maximum: 4.294967295e+09
subset string
The name of a subset within the service.
mirrorPercent integer
minimum: 0
maximum: 4.294967295e+09
mirrorPercentage object
Percentage of the traffic to be mirrored by the `mirror` field.
value number
format: double
mirror_percent integer
minimum: 0
maximum: 4.294967295e+09
mirrors []object
Specifies the destinations to mirror HTTP traffic in addition to the original destination.
destination object required
Destination specifies the target of the mirror operation.
host string required
The name of a service from the service registry.
port object
Specifies the port on the host that is being addressed.
number integer
minimum: 0
maximum: 4.294967295e+09
subset string
The name of a subset within the service.
percentage object
Percentage of the traffic to be mirrored by the `destination` field.
value number
format: double
name string
The name assigned to the route for debugging purposes.
redirect object
A HTTP rule can either return a direct_response, redirect or forward (default) traffic.
authority string
On a redirect, overwrite the Authority/Host portion of the URL with this value.
derivePort string
On a redirect, dynamically set the port: * FROM_PROTOCOL_DEFAULT: automatically set to 80 for HTTP and 443 for HTTPS. Valid Options: FROM_PROTOCOL_DEFAULT, FROM_REQUEST_PORT
enum: FROM_PROTOCOL_DEFAULT, FROM_REQUEST_PORT
port integer
On a redirect, overwrite the port portion of the URL with this value.
minimum: 0
maximum: 4.294967295e+09
redirectCode integer
On a redirect, Specifies the HTTP status code to use in the redirect response.
minimum: 0
maximum: 4.294967295e+09
scheme string
On a redirect, overwrite the scheme portion of the URL with this value.
uri string
On a redirect, overwrite the Path portion of the URL with this value.
retries object
Retry policy for HTTP requests.
attempts integer
Number of retries to be allowed for a given request.
format: int32
perTryTimeout string
Timeout per attempt for a given request, including the initial call and any retries.
retryOn string
Specifies the conditions under which retry takes place.
retryRemoteLocalities boolean
Flag to specify whether the retries should retry to other localities.
rewrite object
Rewrite HTTP URIs and Authority headers.
authority string
rewrite the Authority/Host header with this value.
uri string
rewrite the path (or the prefix) portion of the URI with this value.
uriRegexRewrite object
rewrite the path portion of the URI with the specified regex.
match string
[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).
rewrite string
The string that should replace into matching portions of original URI.
route []object
A HTTP rule can either return a direct_response, redirect or forward (default) traffic.
destination object required
Destination uniquely identifies the instances of a service to which the request/connection should be forwarded to.
host string required
The name of a service from the service registry.
port object
Specifies the port on the host that is being addressed.
number integer
minimum: 0
maximum: 4.294967295e+09
subset string
The name of a subset within the service.
headers object
request object
add object
remove []string
set object
response object
add object
remove []string
set object
weight integer
Weight specifies the relative proportion of traffic to be forwarded to the destination.
format: int32
timeout string
Timeout for HTTP requests, default is disabled.
tcp []object
An ordered list of route rules for opaque TCP traffic.
match []object
Match conditions to be satisfied for the rule to be activated.
destinationSubnets []string
IPv4 or IPv6 ip addresses of destination with optional subnet.
gateways []string
Names of gateways where the rule should be applied.
port integer
Specifies the port on the host that is being addressed.
minimum: 0
maximum: 4.294967295e+09
sourceLabels object
One or more labels that constrain the applicability of a rule to workloads with the given labels.
sourceNamespace string
Source namespace constraining the applicability of a rule to workloads in that namespace.
sourceSubnet string
route []object
The destination to which the connection should be forwarded to.
destination object required
Destination uniquely identifies the instances of a service to which the request/connection should be forwarded to.
host string required
The name of a service from the service registry.
port object
Specifies the port on the host that is being addressed.
number integer
minimum: 0
maximum: 4.294967295e+09
subset string
The name of a subset within the service.
weight integer
Weight specifies the relative proportion of traffic to be forwarded to the destination.
format: int32
tls []object
An ordered list of route rule for non-terminated TLS & HTTPS traffic.
match []object required
Match conditions to be satisfied for the rule to be activated.
destinationSubnets []string
IPv4 or IPv6 ip addresses of destination with optional subnet.
gateways []string
Names of gateways where the rule should be applied.
port integer
Specifies the port on the host that is being addressed.
minimum: 0
maximum: 4.294967295e+09
sniHosts []string required
SNI (server name indicator) to match on.
sourceLabels object
One or more labels that constrain the applicability of a rule to workloads with the given labels.
sourceNamespace string
Source namespace constraining the applicability of a rule to workloads in that namespace.
route []object
The destination to which the connection should be forwarded to.
destination object required
Destination uniquely identifies the instances of a service to which the request/connection should be forwarded to.
host string required
The name of a service from the service registry.
port object
Specifies the port on the host that is being addressed.
number integer
minimum: 0
maximum: 4.294967295e+09
subset string
The name of a subset within the service.
weight integer
Weight specifies the relative proportion of traffic to be forwarded to the destination.
format: int32
status object

No matches. Try .spec.exportTo for an exact path