microsoft / mindaro

Bridge to Kubernetes - for Visual Studio and Visual Studio Code
MIT License
307 stars 106 forks source link

Can't debug multiple microservices on my computer and have them redirect traffic to each other. #109

Open itays-chase opened 3 years ago

itays-chase commented 3 years ago

Describe the bug I am trying to debug multiple microservices which calls each other. Let's call them frontent api and backend api. The url to call the frontend is frontend.example.com The url to call the backend is backend.example.com I want to be able to test their flow while having them running locallly on my compter using isolation mode.

as I understand to achive that I have to use the same isolation header, because otherwise when the frontend will call the backend it will find only the one on the cluster.

The problem is when I give them both the isolation header (eg: itays), the routing manager configures envoy proxy that requests to itays.frontend.example.com will go to the service on the cluster and only requests to itays.backend.example.com will go the the service on my computer, which is not what I need. as a result I can't debug that flow with both of them running on my computer. when I disconnect from the backend, the requests to frontend does go to my local computer, but again I want to debug both of them together in isolation.

Is bridge to kubernetes design so you can debug a flow of request with only one service connected?

Configration

This is The envoy config when connecting only with the frontend: as you can see itays.frontend.example.com is redirecting to my local computer.

config: | static_resources: listeners:

this is the config after connecting my computer with the backend api (both of them are connected). as you can see itays.frontend.example.com is no longer redirecting to my local computer.

config: | static_resources: listeners:

Thanks For your help :)

pragyamehta commented 3 years ago

Hi @itays-chase Thanks for reporting this issue. I have created a bug on our side for this and we will prioritize and fix it. Thanks for your patience!

rakeshvanga commented 3 years ago

@itays-chase I was able to repro the issue. We would work on a fix and release it soon. In the mean while if it possible you could use the localhost url to hit the frontend running on the local dev machine. You could run curl -H "kubernetes-route-as: itays" localhost: <frontend-localport>.

itays-chase commented 3 years ago

@rakeshvanga please let me know when it's fixed as I am waiting for this solution to implement bridge to kubernetes in my team. Thanks!

itays-chase commented 3 years ago

@rakeshvanga any news?

rakeshvanga commented 3 years ago

@itays-chase I've fixed the issue but still waiting for release. I would update once we release the change. The release should be done today or tomorrow.

rakeshvanga commented 3 years ago

@itays-chase, We've released the fix for this issue. Can you let us know if you see any other issues?

Thanks.

itays-chase commented 3 years ago

@rakeshvanga, Thanks! I'll check :)