-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use annotation for ebpf instrumentation (#766)
- Loading branch information
Showing
23 changed files
with
770 additions
and
332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package instrumentation_ebpf | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/keyval-dev/odigos/common" | ||
"github.com/keyval-dev/odigos/odiglet/pkg/ebpf" | ||
"k8s.io/apimachinery/pkg/runtime" | ||
ctrl "sigs.k8s.io/controller-runtime" | ||
"sigs.k8s.io/controller-runtime/pkg/client" | ||
) | ||
|
||
type DaemonSetsReconciler struct { | ||
client.Client | ||
Scheme *runtime.Scheme | ||
Directors map[common.ProgrammingLanguage]ebpf.Director | ||
} | ||
|
||
func (d *DaemonSetsReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error) { | ||
err := ApplyEbpfToPodWorkload(ctx, d.Client, d.Directors, &PodWorkload{ | ||
Name: request.Name, | ||
Namespace: request.Namespace, | ||
Kind: "DaemonSet", | ||
}) | ||
|
||
return ctrl.Result{}, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package instrumentation_ebpf | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/keyval-dev/odigos/common" | ||
"github.com/keyval-dev/odigos/odiglet/pkg/ebpf" | ||
"k8s.io/apimachinery/pkg/runtime" | ||
ctrl "sigs.k8s.io/controller-runtime" | ||
"sigs.k8s.io/controller-runtime/pkg/client" | ||
) | ||
|
||
type DeploymentsReconciler struct { | ||
client.Client | ||
Scheme *runtime.Scheme | ||
Directors map[common.ProgrammingLanguage]ebpf.Director | ||
} | ||
|
||
func (d *DeploymentsReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error) { | ||
err := ApplyEbpfToPodWorkload(ctx, d.Client, d.Directors, &PodWorkload{ | ||
Name: request.Name, | ||
Namespace: request.Namespace, | ||
Kind: "Deployment", | ||
}) | ||
|
||
return ctrl.Result{}, err | ||
} |
Oops, something went wrong.