ASMMeshConfig is a custom resource from Alibaba Cloud Service Mesh (ASM) that enables global configuration of essential parameters in the service mesh. It provides similar functionality to Istio's MeshConfig, allowing centralized management of mesh-level settings such as connection timeouts, protocol detection, path normalization, and retry policies.
Sample configuration
The following code provides an example of configurations for an ASM instance, including connection settings, path normalization, and HTTP retry policies.
apiVersion: istio.alibabacloud.com/v1beta1
kind: ASMMeshConfig
metadata:
name: default
spec:
connectTimeout: 30s
tcpKeepalive:
probes: 5
time: 7200s
interval: 72s
pathNormalization:
normalization: MERGE_SLASHES
defaultHttpRetryPolicy:
attempts: 3
perTryTimeout: 1s
retryOn: gateway-error,connect-failure,refused-stream
enablePrometheusMerge: trueTo utilize all fields of the ASMMeshConfig CRD, the ASM instance must be version 1.24 or later. The name field of the ASMMeshConfig CRD must be set to default. Other names are invalid.
Field description
Basic configurations
Field path | Data type | Description | Example | Scope of impact |
| Duration | Defines the maximum wait time for the Envoy proxy to establish a connection over TCP. The |
| Mesh-level outbound TCP connections. |
| Duration | The timeout period for automatic protocol detection to identify HTTP/HTTPS traffic. After timeout, traffic is processed according to the original protocol. Important This field is configurable only in ASM 1.19 and earlier. |
| Mesh-level protocol sniffing. |
TCP keepalive configurations
Field path | Data type | Description | Example | Scope of impact |
| Uint32 | The maximum number of TCP keepalive probe packets sent. The value |
| Outbound persistent connections over TCP. |
| Duration | The maximum amount of time for which TCP can remain in the idle state. Keepalive probe packets are sent upon timeout. |
| |
| Duration | Interval between sending keepalive probe packets. It must be less than the value of the |
|
Path normalization
Field path | Data type | Description | Example | Scope of impact |
| Enum | URI path processing policy:
|
| Mesh-level HTTP routing. |
HTTP retry policies
Field path | Data type | Description | Example | Scope of impact |
| Int32 | Maximum number of the retries of all HTTP requests (including the initial request). It is effective only when VirtualService is not explicitly configured. |
| HTTP routing policy. |
| Duration | Timeout for a single retry, which must be shorter than the total timeout defined in VirtualService. |
| |
| String | Conditions that trigger retries. Supports standard error types:
|
|
Monitoring integration
Field path | Data type | Description | Example | Scope of impact |
| Bool | Automatically merge the original |
| Prometheus monitoring configuration. |