Learning - Plugin

Definition of Plugin

A plug-in is a model definition relative to a component. The plug-in is mainly used to describe the implementation of the extended operation and maintenance capabilities of the business component. Since the implementation of application operation and maintenance features have greater commonality, the plug-in itself only contains description and implementation, so that it can be reused. Must be bound to the component to have runtime state. At present, plug-ins need to have a runtime to achieve a kind of operation and maintenance capabilities, such as performance analysis plug-ins and network management plug-ins. Perhaps in the future, we will define more plug-in types including virtual plug-in description models without runtime, such as monitoring visualization plug-ins to describe visual UI.

The runtime environment of the plug-in with runtime is consistent with the bound components from the following aspects:

  • Network space This is a very important feature, the network space is consistent so that the plug-in can bypass the component network traffic copy, truncation, set the component local domain name resolution, etc.
  • Storage Persistent Space This feature allows plug-ins and components to exchange files through persistent directories.
  • Environment Variables This feature allows plugins to read component environment variables.

Categories of Plugins

Category NameRoleControl
Performance AnalysisService Install the performance analysis plug-in to display the performance analysis page
Ingress network classOne of the ServiceMesh plug-in types, which handles downstream traffic of componentsDynamic allocation of listening ports
Export network classOne of the ServiceMesh plug-in types, processing upstream traffic of componentsSupport service discovery
Entry and exit co-governance network classOne of the ServiceMesh plug-in types, and load processing components upstream and downstream trafficSupport service discovery
Initialization typeThe service starts after the plug-in first starts and exits normally, user service data initialization or other initialization operations
General typesSuch as data backup, log collection

Plug-in Configuration Items

The function of the configuration item is to describe the configuration information required by the plug-in, similar to the definition form. When the plug-in is instantiated (that is, when the component is installed and bound), the configuration form is generated according to the relevant metadata of the component. In addition to basic environment variable requirements, plug-in configuration generally needs to be combined with metadata such as component ports and dependent components. For example, define the fuse configuration or routing configuration of the egress management plug-in on a certain dependent communication link.

Configuration items can be grouped, and each group of configuration items can be based on a certain metadata type. Currently supported metadata types include: component port, downstream component port. Each group of configuration items can also define its injection method, including: environment variables and active discovery. Configuration groups that rely on component metadata can only be obtained through active discovery.

More Reading

Plugin Development Instructions