From f3887e9228204dbcb6d1b69b297ec1c7ed6d5daa Mon Sep 17 00:00:00 2001 From: Mohamed Mahmoud Date: Tue, 11 Jun 2024 12:49:22 -0400 Subject: [PATCH] update samples config to include more ebpf program types Signed-off-by: Mohamed Mahmoud --- ...bpfman-operator.clusterserviceversion.yaml | 63 ++++++++++++------- .../manifests/bpfman.io_bpfapplications.yaml | 6 +- .../kustomization.yaml | 2 +- .../bpfman.io_v1alpha1_bpfapplication.yaml | 42 ++++++++----- 4 files changed, 76 insertions(+), 37 deletions(-) diff --git a/bundle/manifests/bpfman-operator.clusterserviceversion.yaml b/bundle/manifests/bpfman-operator.clusterserviceversion.yaml index af55352fc..aaae760e7 100644 --- a/bundle/manifests/bpfman-operator.clusterserviceversion.yaml +++ b/bundle/manifests/bpfman-operator.clusterserviceversion.yaml @@ -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 @@ -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 + } } ] } @@ -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 diff --git a/bundle/manifests/bpfman.io_bpfapplications.yaml b/bundle/manifests/bpfman.io_bpfapplications.yaml index 6053bd26f..b657004f2 100644 --- a/bundle/manifests/bpfman.io_bpfapplications.yaml +++ b/bundle/manifests/bpfman.io_bpfapplications.yaml @@ -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 diff --git a/config/bpfman-operator-deployment/kustomization.yaml b/config/bpfman-operator-deployment/kustomization.yaml index 816ab6601..d0eb3dd30 100644 --- a/config/bpfman-operator-deployment/kustomization.yaml +++ b/config/bpfman-operator-deployment/kustomization.yaml @@ -5,4 +5,4 @@ kind: Kustomization images: - name: quay.io/bpfman/bpfman-operator newName: quay.io/bpfman/bpfman-operator - newTag: latest-amd64 + newTag: latest diff --git a/config/samples/bpfman.io_v1alpha1_bpfapplication.yaml b/config/samples/bpfman.io_v1alpha1_bpfapplication.yaml index 035f078d3..494255585 100644 --- a/config/samples/bpfman.io_v1alpha1_bpfapplication.yaml +++ b/config/samples/bpfman.io_v1alpha1_bpfapplication.yaml @@ -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 \ No newline at end of file