Skip to content

Commit

Permalink
update samples config to include more ebpf program types
Browse files Browse the repository at this point in the history
Signed-off-by: Mohamed Mahmoud <mmahmoud@redhat.com>
  • Loading branch information
msherif1234 committed Jun 11, 2024
1 parent cffb625 commit f3887e9
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 37 deletions.
63 changes: 42 additions & 21 deletions bundle/manifests/bpfman-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,14 @@ metadata:
"spec": {
"bytecode": {
"image": {
"url": "quay.io/bpfman-bytecode/testapp:latest"
"url": "quay.io/mmahmoud/bpfman-bytecode/go-application-counter:all"
}
},
"globaldata": {
"GLOBAL_u32": [
13,
12,
11,
10
],
"GLOBAL_u8": [
1
]
},
"nodeselector": {},
"programs": [
{
"fentry": {
"func_name": "do_unlinkat"
},
"type": "Fentry"
},
{
"kprobe": {
"bpffunctionname": "my_kprobe",
"bpffunctionname": "kprobe_counter",
"func_name": "try_to_wake_up",
"offset": 0,
"retprobe": false
Expand All @@ -49,11 +32,49 @@ metadata:
},
{
"tracepoint": {
"bpffunctionname": "tracepoint_kill_recorder",
"names": [
"syscalls/sys_enter_openat"
"syscalls/sys_enter_kill"
]
},
"type": "Tracepoint"
},
{
"tc": {
"bpffunctionname": "stats",
"direction": "ingress",
"interfaceselector": {
"primarynodeinterface": true
},
"priority": 55
},
"type": "TC"
},
{
"type": "Uprobe",
"uprobe": {
"bpffunctionname": "uprobe_counter",
"containers": {
"containernames": [
"go-target"
],
"namespace": "go-target",
"pods": {}
},
"func_name": "main.getCount",
"retprobe": false,
"target": "/go-target"
}
},
{
"type": "XDP",
"xdp": {
"bpffunctionname": "xdp_stats",
"interfaceselector": {
"primarynodeinterface": true
},
"priority": 55
}
}
]
}
Expand Down Expand Up @@ -269,7 +290,7 @@ metadata:
]
capabilities: Basic Install
containerImage: quay.io/bpfman/bpfman-operator:v0.0.0
createdAt: "2024-06-10T10:47:43Z"
createdAt: "2024-06-11T16:44:45Z"
operators.operatorframework.io/builder: operator-sdk-v1.27.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/bpfman/bpfman
Expand Down
6 changes: 5 additions & 1 deletion bundle/manifests/bpfman.io_bpfapplications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ spec:
singular: bpfapplication
scope: Cluster
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .status.conditions[0].reason
name: Status
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: BpfApplication is the Schema for the bpfapplications API
Expand Down
2 changes: 1 addition & 1 deletion config/bpfman-operator-deployment/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: Kustomization
images:
- name: quay.io/bpfman/bpfman-operator
newName: quay.io/bpfman/bpfman-operator
newTag: latest-amd64
newTag: latest
42 changes: 28 additions & 14 deletions config/samples/bpfman.io_v1alpha1_bpfapplication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,40 @@ spec:
nodeselector: {}
bytecode:
image:
url: quay.io/bpfman-bytecode/testapp:latest
globaldata:
GLOBAL_u8:
- 0x01
GLOBAL_u32:
- 0x0D
- 0x0C
- 0x0B
- 0x0A
url: quay.io/mmahmoud/bpfman-bytecode/go-application-counter:all
programs:
- type: Fentry
fentry:
func_name: do_unlinkat
- type: Kprobe
kprobe:
bpffunctionname: my_kprobe
bpffunctionname: kprobe_counter
func_name: try_to_wake_up
offset: 0
retprobe: false
- type: Tracepoint
tracepoint:
bpffunctionname: tracepoint_kill_recorder
names:
- syscalls/sys_enter_openat
- syscalls/sys_enter_kill
- type: TC
tc:
bpffunctionname: stats
interfaceselector:
primarynodeinterface: true
priority: 55
direction: ingress
- type: Uprobe
uprobe:
bpffunctionname: uprobe_counter
func_name: main.getCount
target: /go-target
retprobe: false
containers:
namespace: go-target
pods: {}
containernames:
- go-target
- type: XDP
xdp:
bpffunctionname: xdp_stats
interfaceselector:
primarynodeinterface: true
priority: 55

0 comments on commit f3887e9

Please sign in to comment.