Skip to content
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

WIP: Initial pass at BpfApplication CRD update for load/attach split #347

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

anfredette
Copy link
Contributor

@anfredette anfredette commented Dec 9, 2024

The main change is that a separate optional list of attach points is
included with each program (except for fentry and fexit programs that just
include an attach boolean). Otherwise, the info is all the same.

The list of attach points may be updated any time after the programs
are loaded, which allows the program to be loaded before any attachments are
made, and allows attachments to be added after the program has been loaded.

Existing controllers have been updated to work with new CRDs, but they only
work with a single attach point per program.

I've updated the bpfman.io_v1alpha1_bpfapplication.yaml, but the others still have
the old format and won't work with the current code.

TODO: Add a per-node CRD (BpfProgram analog) to maintain the per-node
state for the BpfApplication.

@anfredette anfredette force-pushed the load-attach-split branch 2 times, most recently from e352df4 to 0531a5f Compare December 10, 2024 22:15
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

Attention: Patch coverage is 51.46199% with 83 lines in your changes missing coverage. Please review.

Project coverage is 27.16%. Comparing base (db645d4) to head (60d0115).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
apis/v1alpha1/zz_generated.deepcopy.go 49.16% 57 Missing and 4 partials ⚠️
controllers/bpfman-agent/application-program.go 14.28% 6 Missing ⚠️
controllers/bpfman-agent/tc-program.go 55.55% 3 Missing and 1 partial ⚠️
controllers/bpfman-agent/tcx-program.go 50.00% 3 Missing and 1 partial ⚠️
controllers/bpfman-agent/uprobe-program.go 60.00% 3 Missing and 1 partial ⚠️
controllers/bpfman-agent/tracepoint-program.go 75.00% 1 Missing and 1 partial ⚠️
controllers/bpfman-agent/xdp-program.go 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #347      +/-   ##
==========================================
- Coverage   27.66%   27.16%   -0.51%     
==========================================
  Files          87       87              
  Lines        7503     7746     +243     
==========================================
+ Hits         2076     2104      +28     
- Misses       5227     5433     +206     
- Partials      200      209       +9     
Flag Coverage Δ
unittests 27.16% <51.46%> (-0.51%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@anfredette anfredette force-pushed the load-attach-split branch 2 times, most recently from 113089c to 60d0115 Compare December 10, 2024 22:31
@anfredette
Copy link
Contributor Author

anfredette commented Dec 10, 2024

All of the examples will need to be updated with the new CRD format before the Kubernetes integration tests will pass.

Copy link
Contributor

mergify bot commented Dec 18, 2024

@anfredette, this pull request is now in conflict and requires a rebase.

@mergify mergify bot added the needs-rebase label Dec 18, 2024
The main change is that a separate optional list of attach points is
included with each program (except for fentry and fexit programs that just
include an attach boolean). Otherwise, the info is all the same.

The list of attach points may be updated any time after the programs
are loaded, which allows the program to be loaded before any attachments are
made, and allows attachments to be added after the program has been loaded.

Existing controllers have been updated to work with new CRDs, but they only
work with a single attach point per program.

I've updated the bpfman.io_v1alpha1_bpfapplication.yaml, but the others still have
the old format and won't work with the current code.

TODO: Add a per-node CRD (BpfProgram analog) to maintain the per-node
state for the BpfApplication.

Signed-off-by: Andre Fredette <[email protected]>
This is currently incomplete.

Signed-off-by: Andre Fredette <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant