alibaba / nacos

an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
https://nacos.io
Apache License 2.0
30.22k stars 12.83k forks source link

Istio can't use nacos as the mcp server #5301

Closed whalecold closed 3 years ago

whalecold commented 3 years ago

Describe the bug The istio can't startup successfully when I use the nacos as it's mcp server because of the failure of readiness. I found the nacos don't sync the istio/networking/v1alpha3/serviceentries resource to istio.

Expected behavior Istiod can sync all resource and startup successfully.

Acutally behavior Lack of the istio/networking/v1alpha3/serviceentries resource.

How to Reproduce Steps to reproduce the behavior:

  1. git clone https://github.com/nacos-group/nacos-k8s.git
  2. performer ./quick-startup.sh
  3. enable mcp server for nacos, add the key-value to environment variable
        - name: NACOS_ISTIO_MCP_SERVER_ENABLED
          value: "true"
  4. install istio of 1.8.3 version
  5. add the config to istio ConfigMap:
    
    data:
    mesh: |-
    defaultConfig:
      discoveryAddress: istiod.istio-system.svc:15012
      proxyMetadata:
        DNS_AGENT: ""
      tracing:
        zipkin:
          address: zipkin.istio-system:9411
    enablePrometheusMerge: true
    rootNamespace: istio-system
    trustDomain: cluster.local
    configSources:
    - address: nacos-headless.default.svc.cluster.local:18848
    meshNetworks: 'networks: {}'

6. restart the pod of istiod.

**Desktop (please complete the following information):**
 - OS: [kubernetes]
 - Version [nacos-server 2.0.0]
 - Module [istio]
 - SDK [e.g. original, spring-cloud-alibaba-nacos, dubbo]

**Additional context**
istio verison: 1.8.3
lzp0412 commented 3 years ago

Istio 1.8 does not support mcp protocol anymore, it uses mcp over xds protocol. This will be released in the next version of nacos 2.0. Currently the code has been merged into the feature_support_grpc_core branch, you can pull it. How to run it? 1、nacos/console/src/main/resources/application.properties , add "nacos.istio.mcp.server.enabled=true" in this file. 2、run nacos/console/src/main/java/com/alibaba/nacos/Nacos.java

whalecold commented 3 years ago

Istio 1.8 does not support mcp protocol anymore, it uses mcp over xds protocol. This will be released in the next version of nacos 2.0. Currently the code has been merged into the feature_support_grpc_core branch, you can pull it. How to run it? 1、nacos/console/src/main/resources/application.properties , add "nacos.istio.mcp.server.enabled=true" in this file. 2、run nacos/console/src/main/java/com/alibaba/nacos/Nacos.java

The istio 1.9 does not support, the 1.8 version support mcp over xds protocol and mcp protocol in both.

whalecold commented 3 years ago

And i found the stream has been established in the log but lack the collection of istio/networking/v1alpha3/serviceentries .