don't add host scanner as excluded ns, use exception instead (#1083)

Signed-off-by: YiscahLevySilas1 <yiscahls@armosec.io>
This commit is contained in:
YiscahLevySilas1
2023-02-07 22:36:32 +02:00
committed by GitHub
parent e6b7086961
commit e90f08968f

View File

@@ -76,10 +76,6 @@ func getInterfaces(ctx context.Context, scanInfo *cautils.ScanInfo) componentInt
logger.L().Ctx(ctxHostScanner).Error("failed to init host scanner", helpers.Error(err))
hostSensorHandler = &hostsensorutils.HostSensorHandlerMock{}
}
// excluding hostsensor namespace
if len(scanInfo.IncludeNamespaces) == 0 && hostSensorHandler.GetNamespace() != "" {
scanInfo.ExcludedNamespaces = fmt.Sprintf("%s,%s", scanInfo.ExcludedNamespaces, hostSensorHandler.GetNamespace())
}
spanHostScanner.End()
// ================== setup registry adaptors ======================================