bpfman / bpfman-operator

Kubernetes operator for bpfman
https://bpfman.io
Apache License 2.0
5 stars 5 forks source link

More concise naming scheme for BpfPrograms #37

Closed anfredette closed 1 week ago

anfredette commented 2 weeks ago

Create a shorter unique name for BpfProgram objects. For Programs, the name is `<Program name>-. ForBpfApplications, the unique name is--`.

Then, the identifying info for BpfProgram that used to be in the name is stored in the BpfProgram object.

Fixes: #28

anfredette commented 2 weeks ago

The new names look like the following:


$ kubectl get bpfprograms.bpfman.io 
NAME                                        TYPE          STATUS         AGE
bpfapplication-sample-kprobe-e9584268       application   bpfmanLoaded   7m56s
bpfapplication-sample-tc-5c64641c           application   bpfmanLoaded   7m49s
bpfapplication-sample-tracepoint-1f1a61a1   application   bpfmanLoaded   7m51s
bpfapplication-sample-uprobe-72e8858d       application   bpfmanLoaded   6m34s
bpfapplication-sample-uprobe-b4fde6c2       application   bpfmanLoaded   6m26s
bpfapplication-sample-xdp-f3ef4383          application   bpfmanLoaded   6m18s
fentry-example-cd940fa0                     fentry        bpfmanLoaded   6m45s
fexit-example-fd53742b                      fexit         bpfmanLoaded   7m45s
kprobe-example-f24ff1d3                     kprobe        bpfmanLoaded   7m36s
tc-pass-all-nodes-563ab6b1                  tc            bpfmanLoaded   7m16s
tracepoint-example-4a04a14a                 tracepoint    bpfmanLoaded   7m26s
uprobe-example-17e5ab9b                     uprobe        bpfmanLoaded   6m55s
uprobe-example-containers-9412fff0          uprobe        bpfmanLoaded   6m48s
uprobe-example-containers-d6b84e71          uprobe        bpfmanLoaded   6m51s
xdp-pass-all-nodes-c6626947                 xdp           bpfmanLoaded   7m5s```
codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 66.43357% with 48 lines in your changes missing coverage. Please review.

Project coverage is 27.40%. Comparing base (b3c925c) to head (5b85c5d). Report is 1 commits behind head on main.

Files Patch % Lines
controllers/bpfman-agent/application-program.go 29.41% 24 Missing :warning:
controllers/bpfman-agent/uprobe-program.go 35.29% 11 Missing :warning:
controllers/bpfman-agent/common.go 88.33% 5 Missing and 2 partials :warning:
controllers/bpfman-agent/fentry-program.go 80.00% 1 Missing :warning:
controllers/bpfman-agent/fexit-program.go 80.00% 1 Missing :warning:
controllers/bpfman-agent/kprobe-program.go 80.00% 1 Missing :warning:
controllers/bpfman-agent/tc-program.go 80.00% 1 Missing :warning:
controllers/bpfman-agent/tracepoint-program.go 80.00% 1 Missing :warning:
controllers/bpfman-agent/xdp-program.go 80.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #37 +/- ## ========================================== + Coverage 26.92% 27.40% +0.48% ========================================== Files 81 81 Lines 6897 6965 +68 ========================================== + Hits 1857 1909 +52 - Misses 4856 4870 +14 - Partials 184 186 +2 ``` | [Flag](https://app.codecov.io/gh/bpfman/bpfman-operator/pull/37/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bpfman) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/bpfman/bpfman-operator/pull/37/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bpfman) | `27.40% <66.43%> (+0.48%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bpfman#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

msherif1234 commented 1 week ago

/LGTM