Closed lucasoares closed 3 years ago
If I need to do something like this solution to be able to upgrade Spring Cloud Gateway using consul without re-deploying all my services I will be VERY SAD:
include-expression: "getTags().?[#this matches '^service_port=.+$'].size() > 0 and getTags().?[#this matches '^service_host=.+$'].size() > 0 and getTags().?[#this matches '^service_name=.+$'].size() > 0 and getTags().?[#this matches '^prefix=.+$'].size() > 0 and getTags().?[#this matches '^service_host=((?!\\$\\{custom_host\\}).)*$'].size() > 0"
getTags()
are acessing ConsulServiceInstance#getTags
Gateway has nothing to do with the creation of metadata. Here is where we list breaking changes.
So it's impossible to keep my architecture intact and update Spring Cloud Gateway without redeploying all my services to register tags as metadata?
Thanks for fast reply @spencergibb
Hello.
This commit removed the ability to use tags as metadata with Consul.
I have more than thousand services registered using tags and my Spring Cloud Gateway have a custom
include-expression
:With new Spring Cloud Gateway now this expression always results in a empty list. I didn't found any documentation on how to workaround this without having to re-deploy my entire service architecture to register metadata instead tags.
What to do? Is there any documentation about breaking changes on Consul discovery service that I can know about these changes?
I really need a workaround since I can't add metadata on all my services right now.
Sorry if this is the wrong project to create this issue. If so please inform me so I can move it to Spring Cloud Gateway. Thanks