postfinance / kubenurse

Kubernetes network monitoring
MIT License
416 stars 39 forks source link

run checks in parallel #148

Closed clementnuss closed 3 months ago

clementnuss commented 3 months ago

currently, service checks are run sequentially: https://github.com/postfinance/kubenurse/blob/154f93114a4d586581f8bffe3a816ab4008db65e/internal/servicecheck/servicecheck.go#L75-L78 however, in case of network failure, then each Run() of the checks could take up a lot of time: assuming a timeout of 5 seconds, then we could have a worst case of (4 5 sec + (nodes) 5 sec).

checks should all be performed in parallel, and WaitGroups should be used for that