All Products
Search
Document Center

Alibaba Cloud Service Mesh:Enable plug-ins to extend ASM capabilities

Last Updated:Mar 26, 2024

Service Mesh (ASM) provides out-of-the-box features in the plug-in marketplace to allow you to extend ASM capabilities as needed. You can select and customize various plug-ins based on your business requirements to satisfy diverse needs.

Prerequisites

An ASM instance of version 1.12.4.0 or later is created. For more information, see Create an ASM instance and Update an ASM instance.

Enable a plug-in

  1. Log on to the ASM console. In the left-side navigation pane, choose Service Mesh > Mesh Management.

  2. On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose Plugin Extension Center > Market Place.

  3. On the Market Place page, click the card of the plug-in that you want to enable.

  4. On the Plugin Detail page, click the Plugin User Guide tab to know more about the features of the plug-in and how to configure the YAML file.

  5. On the Plugin Detail page, click Create Plug-in Instance, configure the following parameters, and then turn on Plugin Switch.

    Parameter

    Description

    Name

    The name of the plug-in instance.

    Plugin Effective scope

    The scope where the plug-in takes effect. Valid values:

    • Global: The plug-in takes effect on all workloads, including all the ingress gateways and sidecar proxies in Kubernetes clusters.

    • Workload Scope: The plug-in takes effect on the specified workloads or on all the workloads in the specified namespace.

    • Gateway Scope: The plug-in takes effect on the specified ingress gateways.

    Add workloads to effective scope

    You can configure this parameter only when the Plugin Effective scope parameter is set to Workload Scope.

    Click Add workloads to effective scope. In the Add workloads to effective scope dialog box, select the namespace in which the workloads that you want to add reside, select the workload type, select the workloads that you want to add in the Select workloads section on the left, add the workloads to the selected section on the right, and then click OK. The workload type is Service or Deployment.

    You can view the workloads that are added to the effective scope in the Sidecars in the effective scope section on the Plugin Detail page.

    Add namespaces to effective scope

    You can configure this parameter only when the Plugin Effective scope parameter is set to Workload Scope.

    Click Add namespaces to effective scope. In the Add namespaces to effective scope dialog box, click the tags of the namespaces that you want to add in the Namespaces not in effective scope section. The tags of the namespaces are automatically moved to the Namespaces in effective scope section. Then, click OK.

    You can view the namespaces that are added to the effective scope in the Sidecars in the effective scope section on the Plugin Detail page.

    Add ASM Gateway to effective scope

    You can configure this parameter only when the Plugin Effective scope is set to Gateway Scope.

    Click Add ASM Gateway to effective scope. In the Add ASM Gateway to effective scope dialog box, click the gateways that you want to add in the Select ASM Gateway section on the left, add the gateways to the selected section on the right, and then click OK.

    You can view the gateways that are added to the effective scope in the ASM Gateways in the effective scope section on the Plugin Detail page.

    Plugin Config

    You need to specify some parameters in the YAML code editor based on your business requirements. For more information about these parameters, see the Plugin User Guide tab.

    Plugin Switch

    The plug-in configurations take effect only after you turn on Plugin Switch.

Related operations

After a plug-in is enabled, you can perform the following operations on the tab for configuring the desired plug-in instance on the Plugin Detail page.

Operation

Procedure

Change the effective scope of the plug-in

In the Plugin Effective scope section, click the scope within which the plug-in will take effect. In the Change Plugin Effective Scope message, click OK.

Add workloads to the effective scope

You can configure this parameter only when the Plugin Effective scope parameter is set to Workload Scope.

Click Add workloads to effective scope. In the Add workloads to effective scope dialog box, select the namespace in which the workloads that you want to add reside, select the workload type, select the workloads that you want to add in the Select workloads section on the left, add the workloads to the selected section on the right, and then click OK. The workload type is Service or Deployment.

You can view the workloads that are added to the effective scope in the Sidecars in the effective scope section on the Plugin Detail page.

Add namespaces to the effective scope

You can configure this parameter only when the Plugin Effective scope parameter is set to Workload Scope.

Click Add namespaces to effective scope. In the Add namespaces to effective scope dialog box, click the tags of the namespaces that you want to add in the Namespaces not in effective scope section. The tags of the namespaces are automatically moved to the Namespaces in effective scope section. Then, click OK.

You can view the namespaces that are added to the effective scope in the Sidecars in the effective scope section on the Plugin Detail page.

Add gateways to the effective scope

You can configure this parameter only when the Plugin Effective scope is set to Gateway Scope.

Click Add ASM Gateway to effective scope. In the Add ASM Gateway to effective scope dialog box, click the gateways that you want to add in the Select ASM Gateway section on the left, add the gateways to the selected section on the right, and then click OK.

You can view the gateways that are added to the effective scope in the ASM Gateways in the effective scope section on the Plugin Detail page.

Edit the plug-in configuration YAML file

In the Plugin Config section, click Update, edit the YAML file, and then click Save in the upper-right corner of the YAML code editor. The new configurations take effect immediately.

Remove workloads from the effective scope

In the Sidecars in the effective scope section, find the workload that you want to remove, and click Unbind in the Actions column. In the Remove effective scope message, click OK.

Remove gateways from the effective scope

In the ASM Gateways in the effective scope section, click the 删除网关 icon in the tag of the gateway that you want to remove. In the Remove effective scope message, click OK.

Disable the plug-in

Click the Dingtalk_20240228143530.png icon on the right of the tab for configuring the desired plug-in instance. In the Delete Plug-in Instance message, click OK.

Important

After you disable the plug-in, the system stability or business logic may be affected and unexpected issues may occur. Exercise caution when you perform this operation.

References

  • You can add HTTP response headers for your web applications to improve application security. For more information, see Use an Envoy filter to add HTTP response headers in ASM.

  • If you need to implement two-way real-time communication between applications in ASM, you can enable the AllowConnect plug-in to support WebSocket tunnel connections over HTTP/2. For more information, see Access services over WebSocket connections in ASM.

  • You can connect Spring Cloud services to ASM. This way, you can use cloud-native service governance capabilities to manage Spring Cloud services without the need to modify your application code. For more information, see Manage Spring Cloud services.