diff --git a/core/pkg/hostsensorutils/hostsensordeploy.go b/core/pkg/hostsensorutils/hostsensordeploy.go index 522e01b2..d4119687 100644 --- a/core/pkg/hostsensorutils/hostsensordeploy.go +++ b/core/pkg/hostsensorutils/hostsensordeploy.go @@ -96,7 +96,7 @@ func (hsh *HostSensorHandler) Init(ctx context.Context) error { hsh.populatePodNamesToNodeNames(ctx, log) if err := hsh.checkPodForEachNode(); err != nil { - logger.L().Ctx(ctx).Warning(failedToValidateHostSensorPodStatus, helpers.Error(err)) + return fmt.Errorf("%s: %v", failedToValidateHostSensorPodStatus, err) } return nil