-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
tetragon: Several observer related cleanups #1525
Conversation
There's no need to create observer, we can just create the policy and call sensors policy handlers. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Moving TestKprobeOverrideNonSyscall to kprobe_validation_test.go as TestKprobeValidationNonSyscallOverride, because It's pure crd validation test. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
And related GetDefaultObserverWithFileNoTest function and related code, which is no longer used. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
The GetDefaultSensorsWithFile needs to return loaded sensors without observer. This complicates other functions that return observer object with loaded sensors. Implementing GetDefaultSensorsWithFile directly without common code to ease up following changes. Remove ctx argument, because it's no longer needed. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
It's no longer needed, moving it to be directly getDefaultObserver function and not to return any sensor objects. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
0d88349
to
7f40476
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
var sensor *sensors.Sensor | ||
|
||
if tp != nil { | ||
sensor, err = sensors.GetMergedSensorFromParserPolicy(tp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor note: I'd like to remove the GetMergedSensorsFromParserPolicy
and use everywhere the same code path: parse the policy, get a list of sensors, and we load the sensors. No need to change it now, but something to avoid in the future.
Several observer related cleanups.