From c9d4c3d742e618c2d643abeebe03801bbc323443 Mon Sep 17 00:00:00 2001 From: sadath-12 Date: Tue, 2 Jan 2024 22:54:43 +0530 Subject: [PATCH] test Signed-off-by: sadath-12 --- ebpf_doc.txt | 17 ++++++++++++++++ info.txt | 20 ++++++++++++++++++- pkg/grpc/process_manager.go | 2 +- .../v1alpha1/tracingpolicynamespaced.go | 2 +- .../v1alpha1/tracingpolicynamespaced.go | 2 +- 5 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 ebpf_doc.txt diff --git a/ebpf_doc.txt b/ebpf_doc.txt new file mode 100644 index 00000000000..4a024f2c999 --- /dev/null +++ b/ebpf_doc.txt @@ -0,0 +1,17 @@ +ebpf: + +we first get the system call on which we want to attach our work(function) that needs to be executed on the kernel +and attach it through kprobe and also take support of kernel function again to retrieve the information about it +those info is stored in some file for example the print one stores in /sys/kernel/debug/tracing/trace_pipe. +but it becomes very tough when things multiply and scale so we eBPF maps + +There are different eBPF maps for different purposes (socket , network ... etc) + + Typical uses +include the following: +• User space writing configuration information to be retrieved by an eBPF +program +• An eBPF program storing state, for later retrieval by another eBPF program (or a +future run of the same program) +• An eBPF program writing results or metrics into a map, for retrieval by the user +space app that will present results \ No newline at end of file diff --git a/info.txt b/info.txt index 8a78e62298e..ec0d8102e99 100644 --- a/info.txt +++ b/info.txt @@ -43,4 +43,22 @@ understand tetracli code properly February 22 - March 18 - GSOC mid-January - LFX -how different clients are configured \ No newline at end of file +how different clients are configured +understand that processmanager + + +understand these compos role in cilium -- ciliumClient, + v1.NewEndpoints(), + ipcache.New(), + fqdncache.New(), + servicecache.New(), + +decode their structs +that events who is consuming just check from the eventschannel + +handleMonitorSocket( consumes monitor events via ciliumState --> see the role of ciliumState here and how after monitoring it stores those events + + +pkg/watcher/crd/watcher.go will watch the crds and trigger + +how is tetragonExecute executed ? \ No newline at end of file diff --git a/pkg/grpc/process_manager.go b/pkg/grpc/process_manager.go index 39013cbab10..15b73dcb986 100644 --- a/pkg/grpc/process_manager.go +++ b/pkg/grpc/process_manager.go @@ -52,7 +52,7 @@ func NewProcessManager( "enableProcessNs": option.Config.EnableProcessNs, }).Info("Starting process manager") return pm, nil -} +} // Notify implements Listener.Notify. func (pm *ProcessManager) Notify(event notify.Message) error { diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v1alpha1/tracingpolicynamespaced.go b/pkg/k8s/client/informers/externalversions/cilium.io/v1alpha1/tracingpolicynamespaced.go index e3683ce06e9..73e2e1d6b85 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v1alpha1/tracingpolicynamespaced.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v1alpha1/tracingpolicynamespaced.go @@ -53,7 +53,7 @@ func NewFilteredTracingPolicyNamespacedInformer(client versioned.Interface, name }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { - tweakListOptions(&options) + tweakListOptions(&options) } return client.CiliumV1alpha1().TracingPoliciesNamespaced(namespace).Watch(context.TODO(), options) }, diff --git a/vendor/github.com/cilium/tetragon/pkg/k8s/client/informers/externalversions/cilium.io/v1alpha1/tracingpolicynamespaced.go b/vendor/github.com/cilium/tetragon/pkg/k8s/client/informers/externalversions/cilium.io/v1alpha1/tracingpolicynamespaced.go index e3683ce06e9..8b164ef1d62 100644 --- a/vendor/github.com/cilium/tetragon/pkg/k8s/client/informers/externalversions/cilium.io/v1alpha1/tracingpolicynamespaced.go +++ b/vendor/github.com/cilium/tetragon/pkg/k8s/client/informers/externalversions/cilium.io/v1alpha1/tracingpolicynamespaced.go @@ -47,7 +47,7 @@ func NewFilteredTracingPolicyNamespacedInformer(client versioned.Interface, name &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { - tweakListOptions(&options) + tweakListOptions(&options) } return client.CiliumV1alpha1().TracingPoliciesNamespaced(namespace).List(context.TODO(), options) },