-
Notifications
You must be signed in to change notification settings - Fork 24
bpfman-operator: Support Load/Attach Split #347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e352df4 to
0531a5f
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #347 +/- ##
===========================================
+ Coverage 18.67% 31.69% +13.01%
===========================================
Files 128 66 -62
Lines 11211 7794 -3417
===========================================
+ Hits 2094 2470 +376
+ Misses 8909 5097 -3812
- Partials 208 227 +19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
113089c to
60d0115
Compare
|
All of the examples will need to be updated with the new CRD format before the Kubernetes integration tests will pass. |
|
@anfredette, this pull request is now in conflict and requires a rebase. |
083793b to
5dce708
Compare
5dce708 to
94b2131
Compare
|
@anfredette, this pull request is now in conflict and requires a rebase. |
94b2131 to
8bf9338
Compare
10366ab to
0c7f942
Compare
0c7f942 to
218f890
Compare
|
@anfredette, this pull request is now in conflict and requires a rebase. |
|
This is still a WIP, but it's working for cluster-scoped XDP programs. Here's a sample of the kubectl output from installing and deleting an XDP program: If you're looking at the code, the new operator and agent code is in the app-operator and app-agent directories, while the old code is still in bpfman-operator and bpfman-agent. I plan to eventually delete the old directories and rename the new ones, but I'm keeping the old code around for comparison and to pull from as needed. |
2799666 to
d68ab2a
Compare
a068f54 to
83561f6
Compare
69a1b95 to
9e5cb54
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.
not sure about renaming the agent files with cl is that for clusterscope ?
| // ProgTypeKretprobe refers to the Kprobe program type. | ||
| ProgTypeKretprobe EBPFProgType = "Kretprobe" | ||
|
|
||
| // ProgTypeUprobe refers to the Uprobe program type. |
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.
I don't know why u deleted the kproberet and uproberet program types ?
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.
They weren't being used.
apis/v1alpha1/shared_types.go
Outdated
| // MapOwnerSelector is used to select the loaded eBPF program this eBPF program | ||
| // will share a map with. The value is a label applied to the BpfProgram to select. | ||
| // The selector must resolve to exactly one instance of a BpfProgram on a given node | ||
| // or the eBPF program will not load. |
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.
we no longer have an object called BpfProgram so we should avoid using it everywhere in code and comments
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.
I got rid of a lot of it, but there's still more work to do.
| return nil, fmt.Errorf("failed to get container pids: %v", err) | ||
| } | ||
|
|
||
| if containerInfo != nil && len(*containerInfo) != 0 { |
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.
nit no need to check the len range will handle that
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.
Done.
8e72399 to
abb5fef
Compare
Yes. I was planning to rename things as follows: |
020133b to
ca275d1
Compare
3b22722 to
4f5cce2
Compare
This commit introduces support for bpfman’s load-attach split from bpfman PR refactoring and CRD changes to align with this new model. Key Changes: - Remove "*Program" CRDs and related code in favor of the BpfApplication CRD, which can contain multiple eBPF programs. - Replace BpfProgram CRD with BpfApplicationState, which stores per-node state information for all eBPF programs in a BpfApplication. - Rename CRDs for better alignment with Kubernetes conventions: - BpfApplication => ClusterBpfApplication (Cluster-scoped) - BpfNsApplication => BpfApplication (Namespace-scoped) - The BpfApplication CRDs have been modified to include an optional list of attach points for each program, enabling pre-loading programs before attachment and supporting dynamic attachment updates. - Redesign the bpfman-agent controller to natively support BpfApplications. Fixes: bpfman#397 Signed-off-by: Andre Fredette <[email protected]>
4f5cce2 to
7c11035
Compare
Also cleaned up a couple of log messages. Fixes: bpfman#347 Signed-off-by: Andre Fredette <[email protected]>
f9d52e1 to
e44bab8
Compare
Also cleaned up a couple of log messages. Fixes: bpfman#398 Signed-off-by: Andre Fredette <[email protected]>
e44bab8 to
94fedba
Compare
Fixes: bpfman#402 Signed-off-by: Andre Fredette <[email protected]>
ade3ce8 to
9927f56
Compare
- Add missing license declaration. - Fixed up some copyright statements. - Turn cosign verification back on - Ran go mod tidy and vendor Signed-off-by: Andre Fredette <[email protected]>
9927f56 to
813f640
Compare
Signed-off-by: Andre Fredette <[email protected]>
Signed-off-by: Mohamed Mahmoud <[email protected]>
973968f to
e36ff6e
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.
Work needs to be done on the integration tests. Merging with integration tests failing and work off main to get tests passing again.
…ithub.com-openshift-api-digest fix(deps): update github.com/openshift/api digest to 635291d
This commit introduces support for bpfman’s load-attach split from bpfman PR
#1354 and includes major
refactoring and CRD changes to align with this new model.
Key Changes:
which can contain multiple eBPF programs.
information for all eBPF programs in a BpfApplication.
attach points for each program, enabling pre-loading programs before
attachment and supporting dynamic attachment updates.
This code can be executed on KIND with the following command:
Fixes: #397