slime-io / slime

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

meshreg: nacos source support adding service host aliases #334

Closed believening closed 1 year ago

believening commented 1 year ago

Previously using the service name or a custom service name as the only host for the generated ServiceEntry, additional hosts are now supported for the ServiceEntry.

Use []*ServiceHostAlias to configure the original host and all aliases of the original host, if the original host is configured, the Source should append the aliases when convert a ServiceEntry .

NOTE: only nacos source support for now


usage:

the nacos service foo.go will be converted to a ServiceEntry with hosts foo.go,bar.go

LEGACY:
  NacosSource:
    Enabled: true
    Address:
    - "http://1.1.1.1:8848"
    Mode: polling
    ServiceHostAliases:
    - Host: foo.go
      Aliases:
      - "bar.go"