[feat]: Introduce multi-cluster and multi-registry architecture #795
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a foundational architectural overhaul of the service discovery system, transforming it into a highly extensible, unified platform. It adds comprehensive support for multi-cluster management, integrates multiple new service registry providers including Nacos, Zookeeper, and Istio, and introduces a cloud-native Kubernetes annotation-based discovery mechanism.
Major Changes
1. Multi-Cluster Management System
pkg/cluster
): A dedicated, thread-safe manager has been introduced to handle the lifecycle of multiple Kubernetes clusters. It is responsible for adding, removing, retrieving, and performing periodic health checks on each configured cluster, ensuring high availability and resilience.multi-cluster.yaml
) and corresponding command-line flags, allowing operators to define cluster endpoints, credentials, and metadata like region and priority.2. Pluggable Multi-Registry Framework
sail/pkg/serviceregistry/nacos
) and Zookeeper (sail/pkg/serviceregistry/zookeeper
) as first-class service registry providers.multi-registry.yaml
configuration file and new CLI flags allow for declaratively defining connections to various registries, each with its own ID, priority, and type-specific parameters.3. Istio Service Mesh Integration
sail/pkg/serviceregistry/istio
): A complete integration with Istio has been implemented, allowing the system to use the Istio service mesh as a source of truth for service discovery.VirtualService
andDestinationRule
metadata) into Dubbo's unified service model.istio-service-registry.yaml
example.4. Kubernetes-Native Service Discovery
Service
objects by parsingdubbo.apache.org/*
annotations. This provides a more cloud-native and declarative way to register services.sail/pkg/serviceregistry/kube/annotations
): A dedicated, robust parser has been created to validate and extract Dubbo service metadata (service name, version, group, etc.) from KubernetesService
annotations.5. Enhanced Registry Aggregator & Core Systems
aggregate.Controller
) has been significantly improved with better panic recovery for individual registry controllers, ensuring a single failing registry does not impact the entire system.Kubernetes
,KubernetesNative
,Istio
, etc.) with distinct strategies and prefixes labels to prevent collisions.options.go
), CLI flags, and Helm chart (values.yaml
) have been extensively updated to support the configuration of all new features.Service
model has been enriched to carry metadata from Kubernetes and Istio resources.Key Features Added
Service
objects, simplifying deployment.Breaking Changes
multi-cluster.yaml
,multi-registry.yaml
) and a significant number of new CLI flags. While backward compatibility for basic setups may be maintained, it is highly recommended to adopt the new configuration model to leverage the full capabilities of the new architecture.To help us figure out who should review this PR, please put an X in all the areas that this PR affects.