microsoft / mindaro

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

Readiness in deployment blocks request. Get HTTP 200 empty response #163

Open arins opened 3 years ago

arins commented 3 years ago

Describe the bug POD listening to port 80 Readiness on port 80 with url / In a deployment when having readiness url set to / this causes the actual url to be blocked (200 empty response)

To Reproduce

  1. Deploy the container with helm for example
  2. start bridge to k8s (vs code in my case)
  3. root url of the application does not work (readiness probe url blocks it!) I only get 200 blank page
  4. Remove readiness probe url and the root url / works again.
**Expected behavior** POD should respond to url even if readiness is set i k8s deployment **Environment Details** Client used: VS Code Operating System: Windows
lolodi commented 3 years ago

Hi @arins , Thanks for reporting this! We'll investigate and report back as soon as we have some news!

pragyamehta commented 3 years ago

Hi @arins This is by design. Our remote agent intercepts all calls that are set up as probes and returns a 200 by default. This is because while we setup debugging, the probe endpoint may or may not be available depending on the frequency of probe and the time it takes to setup the debugging. This may cause the container or pod to recycle and will fail the Bridge to Kubernetes session. Is this behavior blocking something in your testing process?

pragyamehta commented 3 years ago

@arins I realized that you may be using the same endpoint in probes as well as for your application testing. For now to get unblocked, could you please have a separate endpoint for probes? I have created a Work item on our end to enable this scenario. We will update this thread once we fix this. Thanks!

arins commented 3 years ago

@pragyamehta Yes I solved it by just changing the probe url. That was the easiest way to solve the problem. The thing was when I create a helm chart with helm create it automatically added probe url "/". It is easy to forget to change that and my case it was a frontend app with nginx where probe url "/" was good enough. But I can change it to any url which I did. Thanks! You can close the issue!

VamKon commented 3 years ago

Thanks guys. This helped me out. Burned a lot of time before I stumbled on this bug.