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

Initial bpfman-operator support for Load/Attach Split #347

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anfredette
Copy link
Contributor

@anfredette anfredette commented Dec 9, 2024

Initial operator support for Load/Attach Split

This commit contains the framework for using the bpfman load/attach split
support when it becomes available.

Support for both cluster-scoped and namespace-scoped CRDs for all supported
program types is included.

Key changes include:

  • Updates to the BpfApplication and BpfNsApplication CRDs to support a separate list
    of optional attach points for programs. This allows programs to be loaded before
    attachments are made and enables dynamic attachment updates.
  • BpfApplicationState and BpfNsApplicationState CRDs have been added to manage
    per-node information for the BpfApplication and BpfNsApplication CRDs,
    respectively.
  • All files and code related to the *Program CRDs have been removed.

See TODO.md for more details about what's left to do.

@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 57.88618% with 259 lines in your changes missing coverage. Please review.

Project coverage is 41.79%. Comparing base (fc76814) to head (3174166).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
apis/v1alpha1/zz_generated.deepcopy.go 62.10% 192 Missing and 13 partials ⚠️
apis/v1alpha1/shared_types.go 0.00% 28 Missing ⚠️
cmd/bpfman-operator/main.go 0.00% 10 Missing ⚠️
apis/v1alpha1/bpfApplicationState_types.go 57.14% 6 Missing ⚠️
apis/v1alpha1/bpfNsApplicationState_types.go 57.14% 6 Missing ⚠️
cmd/bpfman-agent/main.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #347       +/-   ##
===========================================
+ Coverage   28.12%   41.79%   +13.67%     
===========================================
  Files         128       66       -62     
  Lines       11207     7469     -3738     
===========================================
- Hits         3152     3122       -30     
+ Misses       7773     4091     -3682     
+ Partials      282      256       -26     
Flag Coverage Δ
unittests 41.79% <57.88%> (+13.67%) ⬆️

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.

Copy link
Contributor

mergify bot commented Jan 9, 2025

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

@mergify mergify bot added the needs-rebase label Jan 9, 2025
@mergify mergify bot removed the needs-rebase label Jan 9, 2025
@anfredette anfredette force-pushed the load-attach-split branch 2 times, most recently from 10366ab to 0c7f942 Compare January 9, 2025 14:57
Copy link
Contributor

mergify bot commented Jan 22, 2025

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

@mergify mergify bot added the needs-rebase label Jan 22, 2025
@anfredette anfredette changed the title WIP: Initial pass at BpfApplication CRD update for load/attach split WIP: New bpfman-operator design and CRDs to support the load/attach split Jan 22, 2025
@anfredette
Copy link
Contributor Author

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:
https://gist.github.com/anfredette/4433aaa58518db5d4d14ed2bf4218f55

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.

@anfredette anfredette force-pushed the load-attach-split branch 2 times, most recently from 2799666 to d68ab2a Compare January 22, 2025 17:19
@mergify mergify bot removed the needs-rebase label Jan 22, 2025
@anfredette anfredette changed the title WIP: New bpfman-operator design and CRDs to support the load/attach split Initial bpfman-operator support for Load/Attach Split Jan 23, 2025
@anfredette anfredette force-pushed the load-attach-split branch 3 times, most recently from 69a1b95 to 9e5cb54 Compare January 24, 2025 22:51
@anfredette
Copy link
Contributor Author

I've cleaned up the code a bit and added support for TCX and Fentry. See the TODO.md file for more details.

@anfredette anfredette force-pushed the load-attach-split branch 5 times, most recently from 7905ebb to 01546e9 Compare February 5, 2025 23:23
@anfredette anfredette force-pushed the load-attach-split branch 6 times, most recently from 5335cce to 52f83b1 Compare February 11, 2025 16:52
Copy link
Contributor

mergify bot commented Feb 11, 2025

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

This commit contains the framework for using the bpfman load/attach split
support when it becomes available.

Support for both cluster-scoped and namespace-scoped CRDs for all supported
program types is included.

Key changes include:
- Updates to the BpfApplication and BpfNsApplication CRDs to support a separate list
  of optional attach points for programs. This allows programs to be loaded before
  attachments are made and enables dynamic attachment updates.
- BpfApplicationState and BpfNsApplicationState CRDs have been added to manage
  per-node information for the BpfApplication and BpfNsApplication CRDs,
  respectively.
- All files and code related to the *Program CRDs have been removed.

See TODO.md for more details about what's left to do.

Signed-off-by: Andre Fredette <[email protected]>
Copy link
Contributor

mergify bot commented Feb 11, 2025

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

@mergify mergify bot added the needs-rebase label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant