We have a requirement to adjust the configuration through full automation. Page operations are illegal for us, so we need to update the configuration of a certain change through curl requests. However, the open API provided by Nacos can only be fully changed, which means we need to submit the configuration file in full. However, our configuration is too large, which will require us to add a lot of verification work. We hope to add an open API for modifying a single key. If necessary, we can submit a PR to update this feature ourselves.
我们有一个需求,需要通过全自动化调整配置,页面操作在我们这里是非法的,所以我们需要通过curl请求来更新某一个变更的配置,但是nacos提供的openapi只能全量更改,这就意味着我们需要全量提交配置文件才可以,但是我们的配置太多了,这会让我们增加大量的核对工作,希望可以增加单个key修改的openapi,如果有需要我们可以自己提交PR来更新这个功能。
This way, the problem can be reproduced.
这样就可以复现这个问题。
namespace: cdlgroup: DEFAULT_GROUP
dataId: test.yml
Configuration items in the file:
文件中配置项:
c1: test1
c2: test2
c1: test1 -> c1: newTset
http://ip:8848/nacos/v1/cs/configs?dataId=test.yml&group=DEFAULT_GROUP&type=yaml&username=nacos&password=nacos&content=c1%3A%20newTest
After calling the above APIs, configure as follows:
调用以上api后,配置如下:
c1: newTset
The remaining configurations have been cleared and cannot be modified for a single target configuration.
其余配置被清理,无法修改单个目标配置。
2条答案
按热度按时间yzuktlbb1#
cidc1ykv2#
建设类似switch的功能其实也是要解析配置文件的, 还是和nacos自身能力相悖。如果是单dataid一个开关的话, 倒是可以考虑,一方面看后续社区需求,一方面看dataid的膨胀数量。