iovisor / kubectl-trace

Schedule bpftrace programs on your kubernetes cluster using the kubectl
MIT License
2.04k stars 165 forks source link

feat: Support generic tracers, bcc, target namespace #161

Closed dalehamel closed 3 years ago

dalehamel commented 3 years ago

This adds support for generic tracers, fixing #125

The new "--tracer" flag allows specifying arbitrary generic tracers.

The bcc suite of tools is added to take advantage of this, as well as a "fake" tracer for integration testing this functionality, fixing #112

The primary original author of this functionality was Zeeshan Qureshi.

In order to pull this change in, it was necessary to also pull in functionality that refactored how trace job targets are specified. This introduces a new flag which allows specifying the target namespace separately from the namespace where the trace is created, which fixes #147. This functionality was co-authored with Aaron Olson.

Co-authored-by: Aaron Olson 934893+honkfestival@users.noreply.github.com Co-authored-by: Zeeshan Qureshi zee@zqureshi.in

dalehamel commented 3 years ago

I would have liked for this commit to be smaller, but the refactoring we did for selected_target.go made this quite messy to try and backport otherwise.

Please forgive this basically being two commits in one.