solo-io / squash

The debugger for microservices
https://squash.solo.io
Apache License 2.0
1.74k stars 102 forks source link

Please add namespace support for the vscode extension #181

Closed arindam-bandyopadhyay closed 5 years ago

arindam-bandyopadhyay commented 5 years ago

Squash vscode extension is not working. Please find below the version

arindam-bandyopadhyay commented 5 years ago

@mitchdraft I have spent some time in debugging the issue. You are trying to list all the pods in all the namespace using kubectl get -o json pods --all-namespaces. My k8s cluster is running inside a VPN and this command takes more than 2 minutes in my environment. I have more than 1200 pods running in my environment. As a result, the operation is timed out(I guess) and though it can fetch the json, it's printing the json in the vscode notification instead of parsing and showing 1200 pods Don't you think it would be much nicer if you ask the user first the k8s namespace and then list all the pods in that namespace? The squashctl also does that.

$ squashctl
Attaching debugger
? Select a debugger dlv
? Select a namespace to debug  [Use arrows to move, type to filter]
❯ adm-console
  concourse-main
  cplane-prometheus
  default
  hosts
  ns-kcaruso-ip
  ns-user-0f64b2ee50ab53bc

I tried changing the extension to ask for a namespace and then listing the pods in that namespace. In that way, it's working fine. I am going to raise a PR with the namespace support for the vscode extension(in that way vscode extension and squashctl behaves similarly)

arindam-bandyopadhyay commented 5 years ago

I have raised https://github.com/solo-io/squash/pull/192 for namespace support in squash extension

mitchdraft commented 5 years ago

@arindam-bandyopadhyay thank you for debugging and fixing this issue! I agree that it makes sense to filter by namespace. Your fix looks good, I will do a few checks on my end and merge