apisix icon indicating copy to clipboard operation
apisix copied to clipboard

feat: support for Service Discovery Across Multiple Nacos Clusters

Open ShenFeng312 opened this issue 1 year ago • 18 comments

Description

Fixes #10799

Checklist

  • [ ] I have explained the need for this PR and the problem it solves
  • [ ] I have explained the changes or the new features added to this PR
  • [ ] I have added tests corresponding to this change
  • [ ] I have updated the documentation to reflect this change
  • [ ] I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

ShenFeng312 avatar Feb 21 '24 03:02 ShenFeng312

please fix the linter

shreemaan-abhishek avatar Feb 23 '24 03:02 shreemaan-abhishek

@monkeyDluffy6017 hello~ These errors seem to be unrelated to this PR.

ShenFeng312 avatar Feb 23 '24 06:02 ShenFeng312

Could you add test cases to cover this?

monkeyDluffy6017 avatar Feb 23 '24 07:02 monkeyDluffy6017

Could you add test cases to cover this?

I will add test cases next week

ShenFeng312 avatar Feb 23 '24 08:02 ShenFeng312

@monkeyDluffy6017 hello~ These errors seem to be unrelated to this PR.

The ci problem has been fixed by https://github.com/apache/apisix/pull/10959. Please merge latest master.

zll600 avatar Feb 27 '24 15:02 zll600

CI is still failing

shreemaan-abhishek avatar Apr 18 '24 13:04 shreemaan-abhishek

image @shreemaan-abhishek hello~ i dont know how to fix this error

ShenFeng312 avatar Apr 22 '24 01:04 ShenFeng312

@ShenFeng312 try using --- response_body chomp

shreemaan-abhishek avatar Apr 22 '24 05:04 shreemaan-abhishek

@shreemaan-abhishek The 'others' field represents a list of additional Nacos configurations. Since the previous schema for Nacos configuration was an object, directly changing it to an array would render existing configurations incompatible. Therefore, I've utilized the 'others' field to extend this functionality. Of course, if we decide that backward compatibility is not necessary, we can redesign this configuration schema. Currently, my implementation involves adding a new layer of 'nacosName' within the original 'applications' map. This layer corresponds to different Nacos configurations. Additionally, the asynchronous tasks for fetching Nacos configurations have been modified from fetching from a single Nacos instance to fetching from multiple instances. They are organized into different maps based on the 'name' specified in the configuration.

ShenFeng312 avatar Apr 24 '24 02:04 ShenFeng312

please pay attention here: https://github.com/apache/apisix/pull/10950#discussion_r1577950606

shreemaan-abhishek avatar Apr 29 '24 08:04 shreemaan-abhishek

please pay attention here: #10950 (comment)

fixed

ShenFeng312 avatar Apr 29 '24 10:04 ShenFeng312

can you also mention that host is deprecated now (both in code and docs). Here is an example: image

https://apisix.apache.org/docs/apisix/plugins/kafka-logger/#attributes

shreemaan-abhishek avatar Apr 29 '24 10:04 shreemaan-abhishek

can you also mention that host is deprecated now (both in code and docs). Here is an example: image

https://apisix.apache.org/docs/apisix/plugins/kafka-logger/#attributes

Yes

ShenFeng312 avatar Apr 30 '24 02:04 ShenFeng312

I think this line is enough: https://github.com/apache/apisix/pull/10950/commits/6d2dcc2b8cbdb400ef39a2f0c860609be8648beb?diff=split&w=0#diff-8d872babc717e9d733641b56bfc530ef98751fbe4e68f08d79b2b83109c22fffR302

we can skip these: image

And it think it's better if the comment says: "deprecated, use nacos.hosts instead"

shreemaan-abhishek avatar May 03 '24 04:05 shreemaan-abhishek

Hello, can I continue with this PR? Or do I need to create a new one? Or are we not planning to support this feature? @shreemaan-abhishek

ShenFeng312 avatar Jun 28 '24 07:06 ShenFeng312

I think this really should go on, let me see. No new PR is needed and I am open to adding this feature, we can do that.

bzp2010 avatar Jul 13 '24 06:07 bzp2010

@ShenFeng312 Except for a few minor issues that could be modified, this is an excellent job.

bzp2010 avatar Jul 13 '24 08:07 bzp2010

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Oct 03 '24 10:10 github-actions[bot]