Merge pull request #973 from kooomix/dev

Excluding controlPlaneInfo from error message in case no data recieved.
This commit is contained in:
Rotem Refael
2022-12-14 11:02:55 +02:00
committed by GitHub
@@ -47,7 +47,10 @@ func (wp *workerPool) hostSensorWorker(hsh *HostSensorHandler, wg *sync.WaitGrou
for job := range wp.jobs {
hostSensorDataEnvelope, err := hsh.getResourcesFromPod(job.podName, job.nodeName, job.requestKind, job.path)
if err != nil {
logger.L().Error("failed to get data", helpers.String("path", job.path), helpers.String("podName", job.podName), helpers.Error(err))
// TODO: Add to the condition also cloud provider (as in main cloud providers there is no access to control plane)
if job.path != "/controlPlaneInfo" {
logger.L().Error("failed to get data", helpers.String("path", job.path), helpers.String("podName", job.podName), helpers.Error(err))
}
} else {
wp.results <- hostSensorDataEnvelope
}