diff --git a/doc/controllers.md b/doc/controllers.md index a0a109574a..ddca5acd2b 100644 --- a/doc/controllers.md +++ b/doc/controllers.md @@ -1,3 +1,4 @@ + # Controllers - [Controllers](#controllers) @@ -178,14 +179,16 @@ specUpdateInterval: 10s heartbeatInterval: 5s registryType: consul serviceName: service-001 +externalServiceRegistry: consul-service-registry-example ``` -| Name | Type | Description | Required | -| ----------------- | ------ | ------------------------------------------------------------------------- | --------------------- | -| heartbeatInterval | string | Interval for one service instance reporting its heartbeat | Yes (default: 5s) | -| registryType | string | Protocol the registry center accepts, support `eureka`, `consul`, `nacos` | Yes (default: eureka) | -| apiPort | int | Port listening on for worker's API server | Yes (default: 13009) | -| ingressPort | int | Port listening on for for ingress traffic | Yes (default: 13010) | +| Name | Type | Description | Required | +| ----------------------- | ------ | ------------------------------------------------------------------------- | --------------------- | +| heartbeatInterval | string | Interval for one service instance reporting its heartbeat | Yes (default: 5s) | +| registryType | string | Protocol the registry center accepts, support `eureka`, `consul`, `nacos` | Yes (default: eureka) | +| apiPort | int | Port listening on for worker's API server | Yes (default: 13009) | +| ingressPort | int | Port listening on for for ingress traffic | Yes (default: 13010) | +| externalServiceRegistry | string | External service registry name | No | ### ConsulServiceRegistry @@ -267,6 +270,17 @@ syncInterval: 10s NacosServiceRegistry supports service discovery for Nacos as backend. The config looks like: +```yaml +kind: NacosServiceRegistry +name: nacos-service-registry-example +syncInterval: 10s +servers: + - scheme: http + port: 8848 + contextPath: /nacos + ipAddr: 127.0.0.1 +``` + | Name | Type | Description | Required | | ------------ | ------------------------------------- | ---------------------------- | ------------------ | | servers | [][nacosServerSpec](#nacosserverspec) | Servers of Nacos | Yes | diff --git a/example/config/http-pipeline-example.yaml b/example/config/http-pipeline-example.yaml index d3ce81f638..488218b85d 100644 --- a/example/config/http-pipeline-example.yaml +++ b/example/config/http-pipeline-example.yaml @@ -101,7 +101,7 @@ filters: X-Filter: exact: candidate mainPool: - serviceRegistry: etcd-service-registry-example + serviceRegistry: nacos-service-registry-example serviceName: service-001 serversTags: ["v2"] servers: diff --git a/example/config/mesh-controller-example.yaml b/example/config/mesh-controller-example.yaml index 49c58dec3a..8e179240ef 100644 --- a/example/config/mesh-controller-example.yaml +++ b/example/config/mesh-controller-example.yaml @@ -2,4 +2,4 @@ name: mesh-controller-example kind: MeshController heartbeatInterval: 5s registryType: consul -externalServiceRegistry: etcd-service-registry-example +externalServiceRegistry: nacos-service-registry-example diff --git a/example/config/nacos-service-registry-example.yaml b/example/config/nacos-service-registry-example.yaml new file mode 100644 index 0000000000..bf5cad5f34 --- /dev/null +++ b/example/config/nacos-service-registry-example.yaml @@ -0,0 +1,8 @@ +kind: NacosServiceRegistry +name: nacos-service-registry-example +syncInterval: 10s +servers: + - scheme: http + port: 8848 + contextPath: /nacos + ipAddr: 127.0.0.1