Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gateway路由发布问题 #87

Open
qrua7 opened this issue Feb 14, 2022 · 4 comments
Open

gateway路由发布问题 #87

qrua7 opened this issue Feb 14, 2022 · 4 comments

Comments

@qrua7
Copy link

qrua7 commented Feb 14, 2022

gateway修改单个路由发布后,会覆盖其他已发布路由的配置
image
image
image

@HaojunRen
Copy link
Member

一个网关路由上,可以同时配置若干条路由路径即可,用逗号分隔,例如:Path=/discovery-guide-service-a/,/x/,/y/**

@qrua7
Copy link
Author

qrua7 commented Feb 18, 2022

这个了解了,但是我们说的好像不在一个点上。我想表达的是路由发布这里有点不合理:
当新增一条路由时,点击发布,会覆盖之前的路由配置,只剩下新增的这条(更新同理,会只剩下更新的路由);导致已发布本次未做修改的路由不可用

假设目前有两条已经发布的路由:
[
{
"id": "20220211-0001",
"uri": "lb://service0",
"predicates": [
"Path=/service0/"
],
"userPredicates": [],
"filters": [
"StripPrefix=1"
],
"userFilters": [],
"order": 0,
"metadata": {}
},
{
"id": "20220211-0002",
"uri": "lb://service1",
"predicates": [
"Path=/service1/
"
],
"userPredicates": [],
"filters": [
"StripPrefix=1"
],
"userFilters": [],
"order": 0,
"metadata": {}
}
]
这时有新的需求要新增一个service2的路由,点击发布路由,配置会被覆盖为:
[
{
"id": "20220211-0003",
"uri": "lb://service2",
"predicates": [
"Path=/service2/**"
],
"userPredicates": [],
"filters": [
"StripPrefix=1"
],
"userFilters": [],
"order": 0,
"metadata": {}
}
]
应该是在原有的基础上新增一个,而不是覆盖掉已有的路由

@qrua7
Copy link
Author

qrua7 commented Feb 18, 2022

一个网关路由,可以另外配置一条路由路径,用像素上分隔,例如:Path=discovery-guide-service-a/ ,/x/ ,/

@qrua7 qrua7 closed this as completed Feb 18, 2022
@qrua7 qrua7 reopened this Feb 18, 2022
@HaojunRen
Copy link
Member

好的,我已经让小伙伴来看一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants