slime-io / slime

An intelligent ServiceMesh manager based on Istio
https://slime-io.github.io/
Other
426 stars 78 forks source link

nacos source support fetching instances from all namespaces #293

Closed believening closed 1 year ago

believening commented 1 year ago

Before we fetch the nacos service only in a specific namespace/group, which can be set in this way:

NacosSource:
  Namespace: public
  Group: DEFAULT_GROUP

Now we support fetching the nacos service in all group in all namespaces, which can be set in this way:

NacosSource:
  AllNamespaces: true

When "AllNamespaces" is enabled, we merge instances with the same service name from different namespaces and groups into a single ServiceEntry.

We use the API /nacos/v1/ns/catalog/services for fetching all services in all groups in a specific namespace. This api, which we found in the nacos 1.4.x console, is not documented in the nacos openAPI documentation, so we cannot guarantee that this feature is compatible with the latest version of nacos in the community.