asm.alauda.io
group
CanaryTemplate is the Schema for the Canarytemplates API
v1alpha1
versionobject
CanaryTemplateSpec defines the desired state of CanaryTemplate
object
Analysis defines the validation process of a release
string
requiredSchedule interval for this canary analysis
integer
Number of checks to run for A/B Testing and Blue/Green
[]object
HttpMatchRequest specifies a set of criterion to be met in order for the rule to be applied to the HTTP request. For example, the following restricts the rule to match only requests where the URL path starts with /ratings/v2/ and the request contains a "cookie" with value "user=jason". apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: ratings-route spec: hosts: - ratings http: - match: - headers: cookie: regex: "^(.?;)?(user=jason)(;.)?" uri: prefix: "/ratings/v2/" route: - destination: host: ratings HTTPMatchRequest CANNOT be empty.
object
HTTP Authority values are case-sensitive and formatted as follows:
exact: "value"
for exact string matchprefix: "value"
for prefix-based matchregex: "value"
for ECMAscript style regex-based matchstring
exact string match
string
prefix-based match
string
ECMAscript style regex-based match
string
suffix-based match.
[]string
Names of gateways where the rule should be applied to. Gateway names at the top of the VirtualService (if any) are overridden. The gateway match is independent of sourceLabels.
object
The header keys must be lowercase and use hyphen as the separator, e.g. x-request-id. Header values are case-sensitive and formatted as follows:
exact: "value"
for exact string matchprefix: "value"
for prefix-based matchregex: "value"
for ECMAscript style regex-based match
Note: The keys uri
, scheme
, method
, and authority
will be ignored.object
HTTP Method values are case-sensitive and formatted as follows:
exact: "value"
for exact string matchprefix: "value"
for prefix-based matchregex: "value"
for ECMAscript style regex-based matchstring
exact string match
string
prefix-based match
string
ECMAscript style regex-based match
string
suffix-based match.
integer
Specifies the ports on the host that is being addressed. Many services only expose a single port or label ports with the protocols they support, in these cases it is not required to explicitly select the port.
object
URI Scheme values are case-sensitive and formatted as follows:
exact: "value"
for exact string matchprefix: "value"
for prefix-based matchregex: "value"
for ECMAscript style regex-based matchstring
exact string match
string
prefix-based match
string
ECMAscript style regex-based match
string
suffix-based match.
object
One or more labels that constrain the applicability of a rule to workloads with the given labels. If the VirtualService has a list of gateways specified at the top, it should include the reserved gateway mesh
in order for this field to be applicable.
object
URI to match values are case-sensitive and formatted as follows:
exact: "value"
for exact string matchprefix: "value"
for prefix-based matchregex: "value"
for ECMAscript style regex-based matchstring
exact string match
string
prefix-based match
string
ECMAscript style regex-based match
string
suffix-based match.
integer
Max traffic percentage routed to canary
[]object
CanaryMetric holds the reference to metrics used for canary analysis
string
Interval represents the windows size
string
requiredName of the metric
string
Prometheus query for this metric (deprecated in favor of TemplateRef)
object
TemplateRef references a metric template object
string
API version of the referent
string
Kind of the referent
string
requiredName of the referent
string
Namespace of the referent
number
Max value accepted for this metric
object
Range value accepted for this metric
number
Maximum value
number
Minimum value
boolean
Enable traffic mirroring for Blue/Green
integer
Incremental traffic percentage step
integer
Incremental traffic percentage step for promotion phase
integer
Max number of failed checks before the canary is terminated
[]object
CanaryWebhook holds the reference to external checks used for canary analysis
object
Metadata (key-value pairs) for this webhook
string
requiredName of this webhook
string
Request timeout for this webhook
string
requiredType of this webhook
string
requiredURL address of this webhook
object
AutoscalerRef references an autoscaling resource
string
API version of the referent
string
Kind of the referent
string
requiredName of the referent
string
Namespace of the referent
object
Deprecated: replaced by Analysis
string
requiredSchedule interval for this canary analysis
integer
Number of checks to run for A/B Testing and Blue/Green
[]object
HttpMatchRequest specifies a set of criterion to be met in order for the rule to be applied to the HTTP request. For example, the following restricts the rule to match only requests where the URL path starts with /ratings/v2/ and the request contains a "cookie" with value "user=jason". apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: ratings-route spec: hosts: - ratings http: - match: - headers: cookie: regex: "^(.?;)?(user=jason)(;.)?" uri: prefix: "/ratings/v2/" route: - destination: host: ratings HTTPMatchRequest CANNOT be empty.
object
HTTP Authority values are case-sensitive and formatted as follows:
exact: "value"
for exact string matchprefix: "value"
for prefix-based matchregex: "value"
for ECMAscript style regex-based matchstring
exact string match
string
prefix-based match
string
ECMAscript style regex-based match
string
suffix-based match.
[]string
Names of gateways where the rule should be applied to. Gateway names at the top of the VirtualService (if any) are overridden. The gateway match is independent of sourceLabels.
object
The header keys must be lowercase and use hyphen as the separator, e.g. x-request-id. Header values are case-sensitive and formatted as follows:
exact: "value"
for exact string matchprefix: "value"
for prefix-based matchregex: "value"
for ECMAscript style regex-based match
Note: The keys uri
, scheme
, method
, and authority
will be ignored.object
HTTP Method values are case-sensitive and formatted as follows:
exact: "value"
for exact string matchprefix: "value"
for prefix-based matchregex: "value"
for ECMAscript style regex-based matchstring
exact string match
string
prefix-based match
string
ECMAscript style regex-based match
string
suffix-based match.
integer
Specifies the ports on the host that is being addressed. Many services only expose a single port or label ports with the protocols they support, in these cases it is not required to explicitly select the port.
object
URI Scheme values are case-sensitive and formatted as follows:
exact: "value"
for exact string matchprefix: "value"
for prefix-based matchregex: "value"
for ECMAscript style regex-based matchstring
exact string match
string
prefix-based match
string
ECMAscript style regex-based match
string
suffix-based match.
object
One or more labels that constrain the applicability of a rule to workloads with the given labels. If the VirtualService has a list of gateways specified at the top, it should include the reserved gateway mesh
in order for this field to be applicable.
object
URI to match values are case-sensitive and formatted as follows:
exact: "value"
for exact string matchprefix: "value"
for prefix-based matchregex: "value"
for ECMAscript style regex-based matchstring
exact string match
string
prefix-based match
string
ECMAscript style regex-based match
string
suffix-based match.
integer
Max traffic percentage routed to canary
[]object
CanaryMetric holds the reference to metrics used for canary analysis
string
Interval represents the windows size
string
requiredName of the metric
string
Prometheus query for this metric (deprecated in favor of TemplateRef)
object
TemplateRef references a metric template object
string
API version of the referent
string
Kind of the referent
string
requiredName of the referent
string
Namespace of the referent
number
Max value accepted for this metric
object
Range value accepted for this metric
number
Maximum value
number
Minimum value
boolean
Enable traffic mirroring for Blue/Green
integer
Incremental traffic percentage step
integer
Incremental traffic percentage step for promotion phase
integer
Max number of failed checks before the canary is terminated
[]object
CanaryWebhook holds the reference to external checks used for canary analysis
object
Metadata (key-value pairs) for this webhook
string
requiredName of this webhook
string
Request timeout for this webhook
string
requiredType of this webhook
string
requiredURL address of this webhook
boolean
if set true,we will rollback canary workload modify
object
Reference to NGINX ingress resource
string
API version of the referent
string
Kind of the referent
string
requiredName of the referent
string
Namespace of the referent
number
string
MetricsServer overwrites the -metrics-server flag for this particular canary
number
integer
ProgressDeadlineSeconds represents the maximum time in seconds for a canary deployment to make progress before it is considered to be failed
object
Service defines how ClusterIP services, service mesh or ingress routing objects are generated
[]string
Backends of the generated App Mesh virtual nodes
object
Cross-Origin Resource Sharing policy for the generated Istio virtual service
boolean
Indicates whether the caller is allowed to send the actual request (not the preflight) using credentials. Translates to Access-Control-Allow-Credentials header.
[]string
List of HTTP headers that can be used when requesting the resource. Serialized to Access-Control-Allow-Methods header.
[]string
List of HTTP methods allowed to access the resource. The content will be serialized into the Access-Control-Allow-Methods header.
[]string
The list of origins that are allowed to perform CORS requests. The content will be serialized into the Access-Control-Allow-Origin header. Wildcard * will allow all origins.
[]string
A white list of HTTP headers that the browsers are allowed to access. Serialized into Access-Control-Expose-Headers header.
string
Specifies how long the the results of a preflight request can be cached. Translates to the Access-Control-Max-Age header.
[]string
Gateways attached to the generated Istio virtual service Defaults to the internal mesh gateway
object
Headers operations for the generated Istio virtual service
object
Header manipulation rules to apply before forwarding a request to the destination service
object
Append the given values to the headers specified by keys (will create a comma-separated list of values)
[]string
Remove the specified headers
object
Overwrite the headers specified by key with the given values
object
Header manipulation rules to apply before returning a response to the caller
object
Append the given values to the headers specified by keys (will create a comma-separated list of values)
[]string
Remove the specified headers
object
Overwrite the headers specified by key with the given values
[]string
Hosts attached to the generated Istio virtual service Defaults to the service name
[]object
HttpMatchRequest specifies a set of criterion to be met in order for the rule to be applied to the HTTP request. For example, the following restricts the rule to match only requests where the URL path starts with /ratings/v2/ and the request contains a "cookie" with value "user=jason". apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: ratings-route spec: hosts: - ratings http: - match: - headers: cookie: regex: "^(.?;)?(user=jason)(;.)?" uri: prefix: "/ratings/v2/" route: - destination: host: ratings HTTPMatchRequest CANNOT be empty.
object
HTTP Authority values are case-sensitive and formatted as follows:
exact: "value"
for exact string matchprefix: "value"
for prefix-based matchregex: "value"
for ECMAscript style regex-based matchstring
exact string match
string
prefix-based match
string
ECMAscript style regex-based match
string
suffix-based match.
[]string
Names of gateways where the rule should be applied to. Gateway names at the top of the VirtualService (if any) are overridden. The gateway match is independent of sourceLabels.
object
The header keys must be lowercase and use hyphen as the separator, e.g. x-request-id. Header values are case-sensitive and formatted as follows:
exact: "value"
for exact string matchprefix: "value"
for prefix-based matchregex: "value"
for ECMAscript style regex-based match
Note: The keys uri
, scheme
, method
, and authority
will be ignored.object
HTTP Method values are case-sensitive and formatted as follows:
exact: "value"
for exact string matchprefix: "value"
for prefix-based matchregex: "value"
for ECMAscript style regex-based matchstring
exact string match
string
prefix-based match
string
ECMAscript style regex-based match
string
suffix-based match.
integer
Specifies the ports on the host that is being addressed. Many services only expose a single port or label ports with the protocols they support, in these cases it is not required to explicitly select the port.
object
URI Scheme values are case-sensitive and formatted as follows:
exact: "value"
for exact string matchprefix: "value"
for prefix-based matchregex: "value"
for ECMAscript style regex-based matchstring
exact string match
string
prefix-based match
string
ECMAscript style regex-based match
string
suffix-based match.
object
One or more labels that constrain the applicability of a rule to workloads with the given labels. If the VirtualService has a list of gateways specified at the top, it should include the reserved gateway mesh
in order for this field to be applicable.
object
URI to match values are case-sensitive and formatted as follows:
exact: "value"
for exact string matchprefix: "value"
for prefix-based matchregex: "value"
for ECMAscript style regex-based matchstring
exact string match
string
prefix-based match
string
ECMAscript style regex-based match
string
suffix-based match.
string
Mesh name of the generated App Mesh virtual nodes and virtual service
string
Name of the Kubernetes service generated by Flagger Defaults to CanarySpec.TargetRef.Name
integer
requiredPort of the generated Kubernetes service
boolean
requiredPortDiscovery adds all container ports to the generated Kubernetes service
string
Port name of the generated Kubernetes service Defaults to http
object
Retries policy for the generated virtual service
integer
REQUIRED. Number of retries for a given request. The interval between retries will be determined automatically (25ms+). Actual number of retries attempted depends on the httpReqTimeout.
string
Timeout per retry attempt for a given request. format: 1h/1m/1s/1ms. MUST BE >=1ms.
string
Specifies the conditions under which retry takes place. One or more policies can be specified using a ‘,’ delimited list. The supported policies can be found in https://www.envoyproxy.io/docs/envoy/latest/configuration/http_filters/router_filter#x-envoy-retry-on and https://www.envoyproxy.io/docs/envoy/latest/configuration/http_filters/router_filter#x-envoy-retry-grpc-on
object
Rewrite HTTP URIs for the generated service
string
rewrite the Authority/Host header with this value.
string
rewrite the path (or the prefix) portion of the URI with this value. If the original URI was matched based on prefix, the value provided in this field will replace the corresponding matched prefix.
Target port number or name of the generated Kubernetes service Defaults to CanaryService.Port
string
Timeout of the HTTP or gRPC request
object
TrafficPolicy attached to the generated Istio destination rules
object
Settings controlling the volume of connections to an upstream service
object
HTTP connection pool settings.
string
Specify if http1.1 connection should be upgraded to http2 for the associated destination. DEFAULT - Use the global default. DO_NOT_UPGRADE - Do not upgrade the connection to http2. UPGRADE - Upgrade the connection to http2.
integer
Maximum number of pending HTTP requests to a destination. Default 2^32-1.
integer
Maximum number of requests to a backend. Default 2^32-1.
string
The idle timeout for upstream connection pool connections. The idle timeout is defined as the period in which there are no active requests. If not set, the default is 1 hour. When the idle timeout is reached the connection will be closed. Note that request based timeouts mean that HTTP/2 PINGs will not keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections.
integer
Maximum number of requests per connection to a backend. Setting this parameter to 1 disables keep alive. Default 0, meaning "unlimited", up to 2^29.
integer
Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. Defaults to 2^32-1.
object
Settings common to both HTTP and TCP upstream connections.
string
TCP connection timeout.
integer
Maximum number of HTTP1 /TCP connections to a destination host.
object
Settings controlling the load balancer algorithms.
object
Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service.
object
Hash based on HTTP cookie.
string
requiredREQUIRED. Name of the cookie.
string
Path to set for the cookie.
string
requiredREQUIRED. Lifetime of the cookie.
string
It is required to specify exactly one of the fields as hash key: HTTPHeaderName, HTTPCookie, or UseSourceIP. Hash based on a specific HTTP header.
integer
The minimum number of virtual nodes to use for the hash ring. Defaults to 1024. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node.
boolean
Hash based on the source IP address.
string
It is required to specify exactly one of the fields: Simple or ConsistentHash
object
Settings controlling eviction of unhealthy hosts from the load balancing pool
string
Minimum ejection duration. A host will remain ejected for a period equal to the product of minimum ejection duration and the number of times the host has been ejected. This technique allows the system to automatically increase the ejection period for unhealthy upstream servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
integer
Number of 5xx errors before a host is ejected from the connection pool. When the upstream host is accessed over an opaque TCP connection, connect timeouts, connection error/failure and request failure events qualify as a 5xx error. This feature defaults to 5 but can be disabled by setting the value to 0. Note that consecutive_gateway_errors and consecutive_5xx_errors can be used separately or together. Because the errors counted by consecutive_gateway_errors are also included in consecutive_5xx_errors, if the value of consecutive_gateway_errors is greater than or equal to the value of consecutive_5xx_errors, consecutive_gateway_errors will have no effect.
integer
Number of errors before a host is ejected from the connection pool. Defaults to 5. When the upstream host is accessed over HTTP, a 5xx return code qualifies as an error. When the upstream host is accessed over an opaque TCP connection, connect timeouts and connection error/failure events qualify as an error.
integer
Number of gateway errors before a host is ejected from the connection pool. When the upstream host is accessed over HTTP, a 502, 503, or 504 return code qualifies as a gateway error. When the upstream host is accessed over an opaque TCP connection, connect timeouts and connection error/failure events qualify as a gateway error. This feature is disabled by default or when set to the value 0. Note that consecutive_gateway_errors and consecutive_5xx_errors can be used separately or together. Because the errors counted by consecutive_gateway_errors are also included in consecutive_5xx_errors, if the value of consecutive_gateway_errors is greater than or equal to the value of consecutive_5xx_errors, consecutive_gateway_errors will have no effect.
string
Time interval between ejection sweep analysis. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
integer
Maximum % of hosts in the load balancing pool for the upstream service that can be ejected. Defaults to 10%.
integer
Outlier detection will be enabled as long as the associated load balancing pool has at least min_health_percent hosts in healthy mode. When the percentage of healthy hosts in the load balancing pool drops below this threshold, outlier detection will be disabled and the proxy will load balance across all hosts in the pool (healthy and unhealthy). The threshold can be disabled by setting it to 0%. The default is 0% as it's not typically applicable in k8s environments with few pods per service.
[]object
Traffic policies that apply to specific ports of the service
object
Settings controlling the volume of connections to an upstream service
object
HTTP connection pool settings.
string
Specify if http1.1 connection should be upgraded to http2 for the associated destination. DEFAULT - Use the global default. DO_NOT_UPGRADE - Do not upgrade the connection to http2. UPGRADE - Upgrade the connection to http2.
integer
Maximum number of pending HTTP requests to a destination. Default 2^32-1.
integer
Maximum number of requests to a backend. Default 2^32-1.
string
The idle timeout for upstream connection pool connections. The idle timeout is defined as the period in which there are no active requests. If not set, the default is 1 hour. When the idle timeout is reached the connection will be closed. Note that request based timeouts mean that HTTP/2 PINGs will not keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections.
integer
Maximum number of requests per connection to a backend. Setting this parameter to 1 disables keep alive. Default 0, meaning "unlimited", up to 2^29.
integer
Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. Defaults to 2^32-1.
object
Settings common to both HTTP and TCP upstream connections.
string
TCP connection timeout.
integer
Maximum number of HTTP1 /TCP connections to a destination host.
object
Settings controlling the load balancer algorithms.
object
Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service.
object
Hash based on HTTP cookie.
string
requiredREQUIRED. Name of the cookie.
string
Path to set for the cookie.
string
requiredREQUIRED. Lifetime of the cookie.
string
It is required to specify exactly one of the fields as hash key: HTTPHeaderName, HTTPCookie, or UseSourceIP. Hash based on a specific HTTP header.
integer
The minimum number of virtual nodes to use for the hash ring. Defaults to 1024. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node.
boolean
Hash based on the source IP address.
string
It is required to specify exactly one of the fields: Simple or ConsistentHash
object
Settings controlling eviction of unhealthy hosts from the load balancing pool
string
Minimum ejection duration. A host will remain ejected for a period equal to the product of minimum ejection duration and the number of times the host has been ejected. This technique allows the system to automatically increase the ejection period for unhealthy upstream servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
integer
Number of 5xx errors before a host is ejected from the connection pool. When the upstream host is accessed over an opaque TCP connection, connect timeouts, connection error/failure and request failure events qualify as a 5xx error. This feature defaults to 5 but can be disabled by setting the value to 0. Note that consecutive_gateway_errors and consecutive_5xx_errors can be used separately or together. Because the errors counted by consecutive_gateway_errors are also included in consecutive_5xx_errors, if the value of consecutive_gateway_errors is greater than or equal to the value of consecutive_5xx_errors, consecutive_gateway_errors will have no effect.
integer
Number of errors before a host is ejected from the connection pool. Defaults to 5. When the upstream host is accessed over HTTP, a 5xx return code qualifies as an error. When the upstream host is accessed over an opaque TCP connection, connect timeouts and connection error/failure events qualify as an error.
integer
Number of gateway errors before a host is ejected from the connection pool. When the upstream host is accessed over HTTP, a 502, 503, or 504 return code qualifies as a gateway error. When the upstream host is accessed over an opaque TCP connection, connect timeouts and connection error/failure events qualify as a gateway error. This feature is disabled by default or when set to the value 0. Note that consecutive_gateway_errors and consecutive_5xx_errors can be used separately or together. Because the errors counted by consecutive_gateway_errors are also included in consecutive_5xx_errors, if the value of consecutive_gateway_errors is greater than or equal to the value of consecutive_5xx_errors, consecutive_gateway_errors will have no effect.
string
Time interval between ejection sweep analysis. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
integer
Maximum % of hosts in the load balancing pool for the upstream service that can be ejected. Defaults to 10%.
integer
Outlier detection will be enabled as long as the associated load balancing pool has at least min_health_percent hosts in healthy mode. When the percentage of healthy hosts in the load balancing pool drops below this threshold, outlier detection will be disabled and the proxy will load balance across all hosts in the pool (healthy and unhealthy). The threshold can be disabled by setting it to 0%. The default is 0% as it's not typically applicable in k8s environments with few pods per service.
object
requiredSpecifies the port name or number of a port on the destination service on which this policy is being applied. Names must comply with DNS label syntax (rfc1035) and therefore cannot collide with numbers. If there are multiple ports on a service with the same protocol the names should be of the form -.
string
Valid port name
integer
Valid port number
object
TLS related settings for connections to the upstream service.
string
OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate. If omitted, the proxy will not verify the server's certificate. Should be empty if mode is ISTIO_MUTUAL
.
string
REQUIRED if mode is MUTUAL
. The path to the file holding the client-side TLS certificate to use. Should be empty if mode is ISTIO_MUTUAL
.
string
requiredREQUIRED: Indicates whether connections to this port should be secured using TLS. The value of this field determines how TLS is enforced.
string
REQUIRED if mode is MUTUAL
. The path to the file holding the client's private key. Should be empty if mode is ISTIO_MUTUAL
.
string
SNI string to present to the server during TLS handshake. Should be empty if mode is ISTIO_MUTUAL
.
[]string
A list of alternate names to verify the subject identity in the certificate. If specified, the proxy will verify that the server certificate's subject alt name matches one of the specified values. Should be empty if mode is ISTIO_MUTUAL
.
object
TLS related settings for connections to the upstream service.
string
OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate. If omitted, the proxy will not verify the server's certificate. Should be empty if mode is ISTIO_MUTUAL
.
string
REQUIRED if mode is MUTUAL
. The path to the file holding the client-side TLS certificate to use. Should be empty if mode is ISTIO_MUTUAL
.
string
requiredREQUIRED: Indicates whether connections to this port should be secured using TLS. The value of this field determines how TLS is enforced.
string
REQUIRED if mode is MUTUAL
. The path to the file holding the client's private key. Should be empty if mode is ISTIO_MUTUAL
.
string
SNI string to present to the server during TLS handshake. Should be empty if mode is ISTIO_MUTUAL
.
[]string
A list of alternate names to verify the subject identity in the certificate. If specified, the proxy will verify that the server certificate's subject alt name matches one of the specified values. Should be empty if mode is ISTIO_MUTUAL
.
boolean
SkipAnalysis promotes the canary without analysing it
object
TargetRef references a target resource
string
API version of the referent
string
Kind of the referent
string
requiredName of the referent
string
Namespace of the referent