Skip to content

Extensions causes lots of kubectl processes to spawn that never finish #490

Description

@jeroenlandheer

Expected behaviour

It looks like the extension is using kubectl for watching resources in kubernetes but spawns a process for each and every single item in the workloads / sources list. This is very inefficient because it causes lots of processes to run and some do not terminate when I close VSCode.

Pressing the refresh button in the workloads immediately spawns quite a lot of them (a little less than a 100 in my case) and some of them stop afterwards, some of them don't.

Actual behaviour

When I run this in powershell...

> get-process | ? {$_.name -eq "kubectl"}

 NPM(K)    PM(M)      WS(M)     CPU(s)      Id  SI ProcessName
 ------    -----      -----     ------      --  -- -----------
     13    15,02      15,00       0,03    2720   3 kubectl
     13    14,99      14,98       0,09    4656   3 kubectl
     23    41,20      41,16       0,62    6464   3 kubectl
     22    41,05      41,01       0,47    8080   3 kubectl
     13    14,90      14,90       0,00    9700   3 kubectl
     13    15,00      14,98       0,03   11964   3 kubectl
     22    40,78      41,04       0,67   12904   3 kubectl
     22    41,49      41,61       0,66   15016   3 kubectl
     22    40,35      40,91       0,55   15244   3 kubectl
     22    39,89      40,26       0,62   17116   3 kubectl
     22    40,96      41,21       0,64   21004   3 kubectl
     13    14,91      14,91       0,00   23652   3 kubectl
     22    39,40      40,02       0,50   23824   3 kubectl
     23    40,25      40,50       0,42   25200   3 kubectl
... and another 500+ entries ....

Steps to reproduce

Just run the extension with a Flux deployment on Windows.

We have about:

  • 100 kustomizations
  • 50 helmrelease objects
  • 17 helm repositories
  • 1 git source

Versions

kubectl version: 1.26.1
Flux version: 2.1.0
Git version: N/A
Azure version: N/A
Extension version: v0.25.3
VSCode version: 1.82.2
Operating System (OS) and its version: Win 11 22H2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions