You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of the API review, a comment was made to improve the description
of all fields. This commit makes a pass at the ClusterBpfApplication,
BpfApplication, ClusterBpfApplicationState and BpfApplicationState CRD
fields.
Signed-off-by: Billy McFall <[email protected]>
Copy file name to clipboardExpand all lines: apis/v1alpha1/bpf_application_state_types.go
+67-19Lines changed: 67 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,6 @@ import (
22
22
"sigs.k8s.io/controller-runtime/pkg/client"
23
23
)
24
24
25
-
// BpfApplicationProgramState defines the desired state of BpfApplication
26
25
// +union
27
26
// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'XDP' ? has(self.xdp) : !has(self.xdp)",message="xdp configuration is required when type is xdp, and forbidden otherwise"
28
27
// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'TC' ? has(self.tc) : !has(self.tc)",message="tc configuration is required when type is tc, and forbidden otherwise"
@@ -32,54 +31,96 @@ import (
32
31
typeBpfApplicationProgramStatestruct {
33
32
BpfProgramStateCommon`json:",inline"`
34
33
35
-
// type specifies the bpf program type
34
+
// type specifies the provisioned eBPF program type for this program entry.
35
+
// Type will be one of:
36
+
// TC, TCX, UProbe, URetProbe, XDP
37
+
//
38
+
// When set to TC, the tc object will be populated with the eBPF program data
39
+
// associated with a TC program.
40
+
//
41
+
// When set to TCX, the tcx object will be populated with the eBPF program
42
+
// data associated with a TCX program.
43
+
//
44
+
// When set to UProbe, the uprobe object will be populated with the eBPF
45
+
// program data associated with a UProbe program.
46
+
//
47
+
// When set to URetProbe, the uretprobe object will be populated with the eBPF
48
+
// program data associated with a URetProbe program.
49
+
//
50
+
// When set to XDP, the xdp object will be populated with the eBPF program data
// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'UProbe' ? has(self.uprobe) : !has(self.uprobe)",message="uprobe configuration is required when type is uprobe, and forbidden otherwise"
29
29
// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'URetProbe' ? has(self.uretprobe) : !has(self.uretprobe)",message="uretprobe configuration is required when type is uretprobe, and forbidden otherwise"
30
30
typeBpfApplicationProgramstruct {
31
-
// name is the name of the function that is the entry point for the BPF
32
-
// program
31
+
// name is a required field and is the name of the function that is the entry
32
+
// point for the eBPF program. name must not be an empty string, must not
33
+
// exceed 64 characters in length, must start with alpha characters and must
0 commit comments