描述
CanaryTemplate is the Schema for the Canarytemplates API
类型
object

规格

属性类型描述
apiVersionstring

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kindstring

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadataObjectMeta

ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

specobject

CanaryTemplateSpec defines the desired state of CanaryTemplate

.spec

描述
CanaryTemplateSpec defines the desired state of CanaryTemplate
类型
object
属性类型描述
analysisobject

Analysis defines the validation process of a release

autoscalerRefobject

AutoscalerRef references an autoscaling resource

canaryAnalysisobject

Deprecated: replaced by Analysis

failFallBackboolean

if set true,we will rollback canary workload modify

ingressRefobject

Reference to NGINX ingress resource

maxResponseTimenumber
metricsServerstring

MetricsServer overwrites the -metrics-server flag for this particular canary

minSuccessRatenumber
progressDeadlineSecondsinteger

ProgressDeadlineSeconds represents the maximum time in seconds for a canary deployment to make progress before it is considered to be failed

serviceobject

Service defines how ClusterIP services, service mesh or ingress routing objects are generated

skipAnalysisboolean

SkipAnalysis promotes the canary without analysing it

targetRefobject

TargetRef references a target resource

.spec.analysis

描述
Analysis defines the validation process of a release
类型
object
必填
interval
属性类型描述
intervalstring

Schedule interval for this canary analysis

iterationsinteger

Number of checks to run for A/B Testing and Blue/Green

matcharray

A/B testing HTTP header match conditions

maxWeightinteger

Max traffic percentage routed to canary

metricsarray

Metric check list for this canary analysis

mirrorboolean

Enable traffic mirroring for Blue/Green

stepWeightinteger

Incremental traffic percentage step

stepWeightPromotioninteger

Incremental traffic percentage step for promotion phase

thresholdinteger

Max number of failed checks before the canary is terminated

webhooksarray

Webhook list for this canary analysis

.spec.analysis.match

描述
A/B testing HTTP header match conditions
类型
array

.spec.analysis.match[]

描述
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
属性类型描述
authorityobject

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 ECMAscript style regex-based match
gatewaysarray

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.

headersobject

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 match
  • prefix: "value" for prefix-based match
  • regex: "value" for ECMAscript style regex-based match Note: The keys uri, scheme, method, and authority will be ignored.
methodobject

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 ECMAscript style regex-based match
portinteger

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.

schemeobject

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 ECMAscript style regex-based match
sourceLabelsobject

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.

uriobject

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 ECMAscript style regex-based match

.spec.analysis.match[].authority

描述
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 ECMAscript style regex-based match
类型
object
属性类型描述
exactstring

exact string match

prefixstring

prefix-based match

regexstring

ECMAscript style regex-based match

suffixstring

suffix-based match.

.spec.analysis.match[].gateways

描述
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.
类型
array

.spec.analysis.match[].gateways[]

类型
string

.spec.analysis.match[].headers

描述
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 match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match **Note:** The keys `uri`, `scheme`, `method`, and `authority` will be ignored.
类型
object

.spec.analysis.match[].method

描述
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 ECMAscript style regex-based match
类型
object
属性类型描述
exactstring

exact string match

prefixstring

prefix-based match

regexstring

ECMAscript style regex-based match

suffixstring

suffix-based match.

.spec.analysis.match[].scheme

描述
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 ECMAscript style regex-based match
类型
object
属性类型描述
exactstring

exact string match

prefixstring

prefix-based match

regexstring

ECMAscript style regex-based match

suffixstring

suffix-based match.

.spec.analysis.match[].sourceLabels

描述
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

.spec.analysis.match[].uri

描述
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 ECMAscript style regex-based match
类型
object
属性类型描述
exactstring

exact string match

prefixstring

prefix-based match

regexstring

ECMAscript style regex-based match

suffixstring

suffix-based match.

.spec.analysis.metrics

描述
Metric check list for this canary analysis
类型
array

.spec.analysis.metrics[]

描述
CanaryMetric holds the reference to metrics used for canary analysis
类型
object
必填
name
属性类型描述
intervalstring

Interval represents the windows size

namestring

Name of the metric

querystring

Prometheus query for this metric (deprecated in favor of TemplateRef)

templateRefobject

TemplateRef references a metric template object

thresholdnumber

Max value accepted for this metric

thresholdRangeobject

Range value accepted for this metric

.spec.analysis.metrics[].templateRef

描述
TemplateRef references a metric template object
类型
object
必填
name
属性类型描述
apiVersionstring

API version of the referent

kindstring

Kind of the referent

namestring

Name of the referent

namespacestring

Namespace of the referent

.spec.analysis.metrics[].thresholdRange

描述
Range value accepted for this metric
类型
object
属性类型描述
maxnumber

Maximum value

minnumber

Minimum value

.spec.analysis.webhooks

描述
Webhook list for this canary analysis
类型
array

.spec.analysis.webhooks[]

描述
CanaryWebhook holds the reference to external checks used for canary analysis
类型
object
必填
nametypeurl
属性类型描述
metadataObjectMeta

Metadata (key-value pairs) for this webhook

namestring

Name of this webhook

timeoutstring

Request timeout for this webhook

typestring

Type of this webhook

urlstring

URL address of this webhook

.spec.autoscalerRef

描述
AutoscalerRef references an autoscaling resource
类型
object
必填
name
属性类型描述
apiVersionstring

API version of the referent

kindstring

Kind of the referent

namestring

Name of the referent

namespacestring

Namespace of the referent

.spec.canaryAnalysis

描述
Deprecated: replaced by Analysis
类型
object
必填
interval
属性类型描述
intervalstring

Schedule interval for this canary analysis

iterationsinteger

Number of checks to run for A/B Testing and Blue/Green

matcharray

A/B testing HTTP header match conditions

maxWeightinteger

Max traffic percentage routed to canary

metricsarray

Metric check list for this canary analysis

mirrorboolean

Enable traffic mirroring for Blue/Green

stepWeightinteger

Incremental traffic percentage step

stepWeightPromotioninteger

Incremental traffic percentage step for promotion phase

thresholdinteger

Max number of failed checks before the canary is terminated

webhooksarray

Webhook list for this canary analysis

.spec.canaryAnalysis.match

描述
A/B testing HTTP header match conditions
类型
array

.spec.canaryAnalysis.match[]

描述
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
属性类型描述
authorityobject

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 ECMAscript style regex-based match
gatewaysarray

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.

headersobject

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 match
  • prefix: "value" for prefix-based match
  • regex: "value" for ECMAscript style regex-based match Note: The keys uri, scheme, method, and authority will be ignored.
methodobject

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 ECMAscript style regex-based match
portinteger

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.

schemeobject

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 ECMAscript style regex-based match
sourceLabelsobject

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.

uriobject

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 ECMAscript style regex-based match

.spec.canaryAnalysis.match[].authority

描述
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 ECMAscript style regex-based match
类型
object
属性类型描述
exactstring

exact string match

prefixstring

prefix-based match

regexstring

ECMAscript style regex-based match

suffixstring

suffix-based match.

.spec.canaryAnalysis.match[].gateways

描述
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.
类型
array

.spec.canaryAnalysis.match[].gateways[]

类型
string

.spec.canaryAnalysis.match[].headers

描述
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 match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match **Note:** The keys `uri`, `scheme`, `method`, and `authority` will be ignored.
类型
object

.spec.canaryAnalysis.match[].method

描述
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 ECMAscript style regex-based match
类型
object
属性类型描述
exactstring

exact string match

prefixstring

prefix-based match

regexstring

ECMAscript style regex-based match

suffixstring

suffix-based match.

.spec.canaryAnalysis.match[].scheme

描述
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 ECMAscript style regex-based match
类型
object
属性类型描述
exactstring

exact string match

prefixstring

prefix-based match

regexstring

ECMAscript style regex-based match

suffixstring

suffix-based match.

.spec.canaryAnalysis.match[].sourceLabels

描述
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

.spec.canaryAnalysis.match[].uri

描述
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 ECMAscript style regex-based match
类型
object
属性类型描述
exactstring

exact string match

prefixstring

prefix-based match

regexstring

ECMAscript style regex-based match

suffixstring

suffix-based match.

.spec.canaryAnalysis.metrics

描述
Metric check list for this canary analysis
类型
array

.spec.canaryAnalysis.metrics[]

描述
CanaryMetric holds the reference to metrics used for canary analysis
类型
object
必填
name
属性类型描述
intervalstring

Interval represents the windows size

namestring

Name of the metric

querystring

Prometheus query for this metric (deprecated in favor of TemplateRef)

templateRefobject

TemplateRef references a metric template object

thresholdnumber

Max value accepted for this metric

thresholdRangeobject

Range value accepted for this metric

.spec.canaryAnalysis.metrics[].templateRef

描述
TemplateRef references a metric template object
类型
object
必填
name
属性类型描述
apiVersionstring

API version of the referent

kindstring

Kind of the referent

namestring

Name of the referent

namespacestring

Namespace of the referent

.spec.canaryAnalysis.metrics[].thresholdRange

描述
Range value accepted for this metric
类型
object
属性类型描述
maxnumber

Maximum value

minnumber

Minimum value

.spec.canaryAnalysis.webhooks

描述
Webhook list for this canary analysis
类型
array

.spec.canaryAnalysis.webhooks[]

描述
CanaryWebhook holds the reference to external checks used for canary analysis
类型
object
必填
nametypeurl
属性类型描述
metadataObjectMeta

Metadata (key-value pairs) for this webhook

namestring

Name of this webhook

timeoutstring

Request timeout for this webhook

typestring

Type of this webhook

urlstring

URL address of this webhook

.spec.ingressRef

描述
Reference to NGINX ingress resource
类型
object
必填
name
属性类型描述
apiVersionstring

API version of the referent

kindstring

Kind of the referent

namestring

Name of the referent

namespacestring

Namespace of the referent

.spec.service

描述
Service defines how ClusterIP services, service mesh or ingress routing objects are generated
类型
object
必填
portportDiscovery
属性类型描述
backendsarray

Backends of the generated App Mesh virtual nodes

corsPolicyobject

Cross-Origin Resource Sharing policy for the generated Istio virtual service

gatewaysarray

Gateways attached to the generated Istio virtual service Defaults to the internal mesh gateway

headersobject

Headers operations for the generated Istio virtual service

hostsarray

Hosts attached to the generated Istio virtual service Defaults to the service name

matcharray

URI match conditions for the generated service

meshNamestring

Mesh name of the generated App Mesh virtual nodes and virtual service

namestring

Name of the Kubernetes service generated by Flagger Defaults to CanarySpec.TargetRef.Name

portinteger

Port of the generated Kubernetes service

portDiscoveryboolean

PortDiscovery adds all container ports to the generated Kubernetes service

portNamestring

Port name of the generated Kubernetes service Defaults to http

retriesobject

Retries policy for the generated virtual service

rewriteobject

Rewrite HTTP URIs for the generated service

targetPortinteger|string

Target port number or name of the generated Kubernetes service Defaults to CanaryService.Port

timeoutstring

Timeout of the HTTP or gRPC request

trafficPolicyobject

TrafficPolicy attached to the generated Istio destination rules

.spec.service.backends

描述
Backends of the generated App Mesh virtual nodes
类型
array

.spec.service.backends[]

类型
string

.spec.service.corsPolicy

描述
Cross-Origin Resource Sharing policy for the generated Istio virtual service
类型
object
属性类型描述
allowCredentialsboolean

Indicates whether the caller is allowed to send the actual request (not the preflight) using credentials. Translates to Access-Control-Allow-Credentials header.

allowHeadersarray

List of HTTP headers that can be used when requesting the resource. Serialized to Access-Control-Allow-Methods header.

allowMethodsarray

List of HTTP methods allowed to access the resource. The content will be serialized into the Access-Control-Allow-Methods header.

allowOriginarray

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.

exposeHeadersarray

A white list of HTTP headers that the browsers are allowed to access. Serialized into Access-Control-Expose-Headers header.

maxAgestring

Specifies how long the the results of a preflight request can be cached. Translates to the Access-Control-Max-Age header.

.spec.service.corsPolicy.allowHeaders

描述
List of HTTP headers that can be used when requesting the resource. Serialized to Access-Control-Allow-Methods header.
类型
array

.spec.service.corsPolicy.allowHeaders[]

类型
string

.spec.service.corsPolicy.allowMethods

描述
List of HTTP methods allowed to access the resource. The content will be serialized into the Access-Control-Allow-Methods header.
类型
array

.spec.service.corsPolicy.allowMethods[]

类型
string

.spec.service.corsPolicy.allowOrigin

描述
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.
类型
array

.spec.service.corsPolicy.allowOrigin[]

类型
string

.spec.service.corsPolicy.exposeHeaders

描述
A white list of HTTP headers that the browsers are allowed to access. Serialized into Access-Control-Expose-Headers header.
类型
array

.spec.service.corsPolicy.exposeHeaders[]

类型
string

.spec.service.gateways

描述
Gateways attached to the generated Istio virtual service Defaults to the internal mesh gateway
类型
array

.spec.service.gateways[]

类型
string

.spec.service.headers

描述
Headers operations for the generated Istio virtual service
类型
object
属性类型描述
requestobject

Header manipulation rules to apply before forwarding a request to the destination service

responseobject

Header manipulation rules to apply before returning a response to the caller

.spec.service.headers.request

描述
Header manipulation rules to apply before forwarding a request to the destination service
类型
object
属性类型描述
addobject

Append the given values to the headers specified by keys (will create a comma-separated list of values)

removearray

Remove the specified headers

setobject

Overwrite the headers specified by key with the given values

.spec.service.headers.request.add

描述
Append the given values to the headers specified by keys (will create a comma-separated list of values)
类型
object

.spec.service.headers.request.remove

描述
Remove the specified headers
类型
array

.spec.service.headers.request.remove[]

类型
string

.spec.service.headers.request.set

描述
Overwrite the headers specified by key with the given values
类型
object

.spec.service.headers.response

描述
Header manipulation rules to apply before returning a response to the caller
类型
object
属性类型描述
addobject

Append the given values to the headers specified by keys (will create a comma-separated list of values)

removearray

Remove the specified headers

setobject

Overwrite the headers specified by key with the given values

.spec.service.headers.response.add

描述
Append the given values to the headers specified by keys (will create a comma-separated list of values)
类型
object

.spec.service.headers.response.remove

描述
Remove the specified headers
类型
array

.spec.service.headers.response.remove[]

类型
string

.spec.service.headers.response.set

描述
Overwrite the headers specified by key with the given values
类型
object

.spec.service.hosts

描述
Hosts attached to the generated Istio virtual service Defaults to the service name
类型
array

.spec.service.hosts[]

类型
string

.spec.service.match

描述
URI match conditions for the generated service
类型
array

.spec.service.match[]

描述
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
属性类型描述
authorityobject

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 ECMAscript style regex-based match
gatewaysarray

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.

headersobject

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 match
  • prefix: "value" for prefix-based match
  • regex: "value" for ECMAscript style regex-based match Note: The keys uri, scheme, method, and authority will be ignored.
methodobject

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 ECMAscript style regex-based match
portinteger

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.

schemeobject

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 ECMAscript style regex-based match
sourceLabelsobject

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.

uriobject

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 ECMAscript style regex-based match

.spec.service.match[].authority

描述
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 ECMAscript style regex-based match
类型
object
属性类型描述
exactstring

exact string match

prefixstring

prefix-based match

regexstring

ECMAscript style regex-based match

suffixstring

suffix-based match.

.spec.service.match[].gateways

描述
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.
类型
array

.spec.service.match[].gateways[]

类型
string

.spec.service.match[].headers

描述
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 match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match **Note:** The keys `uri`, `scheme`, `method`, and `authority` will be ignored.
类型
object

.spec.service.match[].method

描述
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 ECMAscript style regex-based match
类型
object
属性类型描述
exactstring

exact string match

prefixstring

prefix-based match

regexstring

ECMAscript style regex-based match

suffixstring

suffix-based match.

.spec.service.match[].scheme

描述
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 ECMAscript style regex-based match
类型
object
属性类型描述
exactstring

exact string match

prefixstring

prefix-based match

regexstring

ECMAscript style regex-based match

suffixstring

suffix-based match.

.spec.service.match[].sourceLabels

描述
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

.spec.service.match[].uri

描述
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 ECMAscript style regex-based match
类型
object
属性类型描述
exactstring

exact string match

prefixstring

prefix-based match

regexstring

ECMAscript style regex-based match

suffixstring

suffix-based match.

.spec.service.retries

描述
Retries policy for the generated virtual service
类型
object
属性类型描述
attemptsinteger

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.

perTryTimeoutstring

Timeout per retry attempt for a given request. format: 1h/1m/1s/1ms. MUST BE >=1ms.

retryOnstring

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

.spec.service.rewrite

描述
Rewrite HTTP URIs for the generated service
类型
object
属性类型描述
authoritystring

rewrite the Authority/Host header with this value.

uristring

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.

.spec.service.trafficPolicy

描述
TrafficPolicy attached to the generated Istio destination rules
类型
object
属性类型描述
connectionPoolobject

Settings controlling the volume of connections to an upstream service

loadBalancerobject

Settings controlling the load balancer algorithms.

outlierDetectionobject

Settings controlling eviction of unhealthy hosts from the load balancing pool

portLevelSettingsarray

Traffic policies specific to individual ports. Note that port level settings will override the destination-level settings. Traffic settings specified at the destination-level will not be inherited when overridden by port-level settings, i.e. default values will be applied to fields omitted in port-level traffic policies.

tlsobject

TLS related settings for connections to the upstream service.

.spec.service.trafficPolicy.connectionPool

描述
Settings controlling the volume of connections to an upstream service
类型
object
属性类型描述
httpobject

HTTP connection pool settings.

tcpobject

Settings common to both HTTP and TCP upstream connections.

.spec.service.trafficPolicy.connectionPool.http

描述
HTTP connection pool settings.
类型
object
属性类型描述
h2UpgradePolicystring

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.

http1MaxPendingRequestsinteger

Maximum number of pending HTTP requests to a destination. Default 2^32-1.

http2MaxRequestsinteger

Maximum number of requests to a backend. Default 2^32-1.

idleTimeoutstring

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.

maxRequestsPerConnectioninteger

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.

maxRetriesinteger

Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. Defaults to 2^32-1.

.spec.service.trafficPolicy.connectionPool.tcp

描述
Settings common to both HTTP and TCP upstream connections.
类型
object
属性类型描述
connectTimeoutstring

TCP connection timeout.

maxConnectionsinteger

Maximum number of HTTP1 /TCP connections to a destination host.

.spec.service.trafficPolicy.loadBalancer

描述
Settings controlling the load balancer algorithms.
类型
object
属性类型描述
consistentHashobject

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.

simplestring

It is required to specify exactly one of the fields: Simple or ConsistentHash

.spec.service.trafficPolicy.loadBalancer.consistentHash

描述
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
属性类型描述
httpCookieobject

Hash based on HTTP cookie.

httpHeaderNamestring

It is required to specify exactly one of the fields as hash key: HTTPHeaderName, HTTPCookie, or UseSourceIP. Hash based on a specific HTTP header.

minimumRingSizeinteger

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.

useSourceIpboolean

Hash based on the source IP address.

.spec.service.trafficPolicy.loadBalancer.consistentHash.httpCookie

描述
Hash based on HTTP cookie.
类型
object
必填
namettl
属性类型描述
namestring

REQUIRED. Name of the cookie.

pathstring

Path to set for the cookie.

ttlstring

REQUIRED. Lifetime of the cookie.

.spec.service.trafficPolicy.outlierDetection

描述
Settings controlling eviction of unhealthy hosts from the load balancing pool
类型
object
属性类型描述
baseEjectionTimestring

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.

consecutive5xxErrorsinteger

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.

consecutiveErrorsinteger

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.

consecutiveGatewayErrorsinteger

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.

intervalstring

Time interval between ejection sweep analysis. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.

maxEjectionPercentinteger

Maximum % of hosts in the load balancing pool for the upstream service that can be ejected. Defaults to 10%.

minHealthPercentinteger

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.

.spec.service.trafficPolicy.portLevelSettings

描述
Traffic policies specific to individual ports. Note that port level settings will override the destination-level settings. Traffic settings specified at the destination-level will not be inherited when overridden by port-level settings, i.e. default values will be applied to fields omitted in port-level traffic policies.
类型
array

.spec.service.trafficPolicy.portLevelSettings[]

描述
Traffic policies that apply to specific ports of the service
类型
object
必填
port
属性类型描述
connectionPoolobject

Settings controlling the volume of connections to an upstream service

loadBalancerobject

Settings controlling the load balancer algorithms.

outlierDetectionobject

Settings controlling eviction of unhealthy hosts from the load balancing pool

portobject

Specifies 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 -.

tlsobject

TLS related settings for connections to the upstream service.

.spec.service.trafficPolicy.portLevelSettings[].connectionPool

描述
Settings controlling the volume of connections to an upstream service
类型
object
属性类型描述
httpobject

HTTP connection pool settings.

tcpobject

Settings common to both HTTP and TCP upstream connections.

.spec.service.trafficPolicy.portLevelSettings[].connectionPool.http

描述
HTTP connection pool settings.
类型
object
属性类型描述
h2UpgradePolicystring

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.

http1MaxPendingRequestsinteger

Maximum number of pending HTTP requests to a destination. Default 2^32-1.

http2MaxRequestsinteger

Maximum number of requests to a backend. Default 2^32-1.

idleTimeoutstring

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.

maxRequestsPerConnectioninteger

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.

maxRetriesinteger

Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. Defaults to 2^32-1.

.spec.service.trafficPolicy.portLevelSettings[].connectionPool.tcp

描述
Settings common to both HTTP and TCP upstream connections.
类型
object
属性类型描述
connectTimeoutstring

TCP connection timeout.

maxConnectionsinteger

Maximum number of HTTP1 /TCP connections to a destination host.

.spec.service.trafficPolicy.portLevelSettings[].loadBalancer

描述
Settings controlling the load balancer algorithms.
类型
object
属性类型描述
consistentHashobject

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.

simplestring

It is required to specify exactly one of the fields: Simple or ConsistentHash

.spec.service.trafficPolicy.portLevelSettings[].loadBalancer.consistentHash

描述
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
属性类型描述
httpCookieobject

Hash based on HTTP cookie.

httpHeaderNamestring

It is required to specify exactly one of the fields as hash key: HTTPHeaderName, HTTPCookie, or UseSourceIP. Hash based on a specific HTTP header.

minimumRingSizeinteger

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.

useSourceIpboolean

Hash based on the source IP address.

.spec.service.trafficPolicy.portLevelSettings[].loadBalancer.consistentHash.httpCookie

描述
Hash based on HTTP cookie.
类型
object
必填
namettl
属性类型描述
namestring

REQUIRED. Name of the cookie.

pathstring

Path to set for the cookie.

ttlstring

REQUIRED. Lifetime of the cookie.

.spec.service.trafficPolicy.portLevelSettings[].outlierDetection

描述
Settings controlling eviction of unhealthy hosts from the load balancing pool
类型
object
属性类型描述
baseEjectionTimestring

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.

consecutive5xxErrorsinteger

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.

consecutiveErrorsinteger

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.

consecutiveGatewayErrorsinteger

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.

intervalstring

Time interval between ejection sweep analysis. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.

maxEjectionPercentinteger

Maximum % of hosts in the load balancing pool for the upstream service that can be ejected. Defaults to 10%.

minHealthPercentinteger

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.

.spec.service.trafficPolicy.portLevelSettings[].port

描述
Specifies 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 <protocol-name>-<DNS label>.
类型
object
属性类型描述
namestring

Valid port name

numberinteger

Valid port number

.spec.service.trafficPolicy.portLevelSettings[].tls

描述
TLS related settings for connections to the upstream service.
类型
object
必填
mode
属性类型描述
caCertificatesstring

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.

clientCertificatestring

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.

modestring

REQUIRED: Indicates whether connections to this port should be secured using TLS. The value of this field determines how TLS is enforced.

privateKeystring

REQUIRED if mode is MUTUAL. The path to the file holding the client's private key. Should be empty if mode is ISTIO_MUTUAL.

snistring

SNI string to present to the server during TLS handshake. Should be empty if mode is ISTIO_MUTUAL.

subjectAltNamesarray

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.

.spec.service.trafficPolicy.portLevelSettings[].tls.subjectAltNames

描述
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`.
类型
array

.spec.service.trafficPolicy.portLevelSettings[].tls.subjectAltNames[]

类型
string

.spec.service.trafficPolicy.tls

描述
TLS related settings for connections to the upstream service.
类型
object
必填
mode
属性类型描述
caCertificatesstring

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.

clientCertificatestring

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.

modestring

REQUIRED: Indicates whether connections to this port should be secured using TLS. The value of this field determines how TLS is enforced.

privateKeystring

REQUIRED if mode is MUTUAL. The path to the file holding the client's private key. Should be empty if mode is ISTIO_MUTUAL.

snistring

SNI string to present to the server during TLS handshake. Should be empty if mode is ISTIO_MUTUAL.

subjectAltNamesarray

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.

.spec.service.trafficPolicy.tls.subjectAltNames

描述
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`.
类型
array

.spec.service.trafficPolicy.tls.subjectAltNames[]

类型
string

.spec.targetRef

描述
TargetRef references a target resource
类型
object
必填
name
属性类型描述
apiVersionstring

API version of the referent

kindstring

Kind of the referent

namestring

Name of the referent

namespacestring

Namespace of the referent

API 端点

可用的 API 端点如下:

  • /apis/asm.alauda.io/v1alpha1/namespaces/{namespace}/canarytemplates
    • DELETE: delete collection of CanaryTemplate
    • GET: list objects of kind CanaryTemplate
    • POST: create a new CanaryTemplate
  • /apis/asm.alauda.io/v1alpha1/namespaces/{namespace}/canarytemplates/{name}
    • DELETE: delete the specified CanaryTemplate
    • GET: read the specified CanaryTemplate
    • PATCH: partially update the specified CanaryTemplate
    • PUT: replace the specified CanaryTemplate

/apis/asm.alauda.io/v1alpha1/namespaces/{namespace}/canarytemplates

HTTP 方法
DELETE
描述
delete collection of CanaryTemplate
HTTP 响应
HTTP 状态码响应体
200 - OKStatus schema
401 - UnauthorizedEmpty
HTTP 方法
GET
描述
list objects of kind CanaryTemplate
HTTP 响应
HTTP 状态码响应体
200 - OKCanaryTemplateList schema
401 - UnauthorizedEmpty
HTTP 方法
POST
描述
create a new CanaryTemplate
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
请求体参数
参数类型描述
bodyCanaryTemplate schemaapplication/json formatted
HTTP 响应
HTTP 状态码响应体
200 - OKCanaryTemplate schema
201 - CreatedCanaryTemplate schema
202 - AcceptedCanaryTemplate schema
401 - UnauthorizedEmpty

/apis/asm.alauda.io/v1alpha1/namespaces/{namespace}/canarytemplates/{name}

HTTP 方法
DELETE
描述
delete the specified CanaryTemplate
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
HTTP 响应
HTTP 状态码响应体
200 - OKStatus schema
202 - AcceptedStatus schema
401 - UnauthorizedEmpty
HTTP 方法
GET
描述
read the specified CanaryTemplate
HTTP 响应
HTTP 状态码响应体
200 - OKCanaryTemplate schema
401 - UnauthorizedEmpty
HTTP 方法
PATCH
描述
partially update the specified CanaryTemplate
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
HTTP 响应
HTTP 状态码响应体
200 - OKCanaryTemplate schema
401 - UnauthorizedEmpty
HTTP 方法
PUT
描述
replace the specified CanaryTemplate
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
请求体参数
参数类型描述
bodyCanaryTemplate schemaapplication/json formatted
HTTP 响应
HTTP 状态码响应体
200 - OKCanaryTemplate schema
201 - CreatedCanaryTemplate schema
401 - UnauthorizedEmpty