diff --git a/go.mod b/go.mod index 3c679b1c8..cb6f75ffd 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.23.0 toolchain go1.23.4 require ( - github.com/bpfman/bpfman-operator v0.5.5-0.20241023163832-0bf84bbd3927 + github.com/bpfman/bpfman-operator v0.5.5 github.com/coreos/go-semver v0.3.1 github.com/go-logr/logr v1.4.2 github.com/google/go-cmp v0.6.0 diff --git a/go.sum b/go.sum index c30300935..9e1c924d8 100644 --- a/go.sum +++ b/go.sum @@ -124,8 +124,8 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/bpfman/bpfman-operator v0.5.5-0.20241023163832-0bf84bbd3927 h1:2odrvZ4MI/tfUkJYAz/d35EiDISbEHsv3360CaF7Rco= -github.com/bpfman/bpfman-operator v0.5.5-0.20241023163832-0bf84bbd3927/go.mod h1:BREOhrpjbTdN3f/3bRx9/YSJsVwz79eUGafR2njaN4Q= +github.com/bpfman/bpfman-operator v0.5.5 h1:LC+VainQyD5QVkdezJGyJ8Kc01vvDNYztBaMexa4sq0= +github.com/bpfman/bpfman-operator v0.5.5/go.mod h1:MulfYXtqy91AAJ7FD3oN5ZY8SMtIGZtwcDDIVhdM61I= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenk/hub v1.0.1 h1:RBwXNOF4a8KjD8BJ08XqN8KbrqaGiQLDrgvUGJSHuPA= diff --git a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/bpfapplication_types.go b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/bpfApplication_types.go similarity index 100% rename from vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/bpfapplication_types.go rename to vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/bpfApplication_types.go diff --git a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/bpfNsApplication_types.go b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/bpfNsApplication_types.go new file mode 100644 index 000000000..acd78ba79 --- /dev/null +++ b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/bpfNsApplication_types.go @@ -0,0 +1,97 @@ +/* +Copyright 2024. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// BpfNsApplicationProgram defines the desired state of BpfApplication +// +union +// +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" +// +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" +// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'TCX' ? has(self.tcx) : !has(self.tcx)",message="tcx configuration is required when type is TCX, and forbidden otherwise" +// +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" +// +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" +type BpfNsApplicationProgram struct { + // Type specifies the bpf program type + // +unionDiscriminator + // +kubebuilder:validation:Required + // +kubebuilder:validation:Enum:="XDP";"TC";"TCX";"Uprobe";"Uretprobe" + Type EBPFProgType `json:"type,omitempty"` + + // xdp defines the desired state of the application's XdpNsPrograms. + // +unionMember + // +optional + XDP *XdpNsProgramInfo `json:"xdp,omitempty"` + + // tc defines the desired state of the application's TcNsPrograms. + // +unionMember + // +optional + TC *TcNsProgramInfo `json:"tc,omitempty"` + + // tcx defines the desired state of the application's TcxNsPrograms. + // +unionMember + // +optional + TCX *TcxNsProgramInfo `json:"tcx,omitempty"` + + // uprobe defines the desired state of the application's UprobeNsPrograms. + // +unionMember + // +optional + Uprobe *UprobeNsProgramInfo `json:"uprobe,omitempty"` + + // uretprobe defines the desired state of the application's UretprobeNsPrograms. + // +unionMember + // +optional + Uretprobe *UprobeNsProgramInfo `json:"uretprobe,omitempty"` +} + +// BpfApplicationSpec defines the desired state of BpfApplication +type BpfNsApplicationSpec struct { + BpfAppCommon `json:",inline"` + + // Programs is a list of bpf programs supported for a specific application. + // It's possible that the application can selectively choose which program(s) + // to run from this list. + // +kubebuilder:validation:MinItems:=1 + Programs []BpfNsApplicationProgram `json:"programs,omitempty"` +} + +// +genclient +//+kubebuilder:object:root=true +//+kubebuilder:subresource:status +//+kubebuilder:resource:scope=Namespaced + +// BpfNsApplication is the Schema for the bpfapplications API +// +kubebuilder:printcolumn:name="NodeSelector",type=string,JSONPath=`.spec.nodeselector` +// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[0].reason` +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +type BpfNsApplication struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec BpfNsApplicationSpec `json:"spec,omitempty"` + Status BpfApplicationStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true +// BpfNsApplicationList contains a list of BpfNsApplications +type BpfNsApplicationList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []BpfNsApplication `json:"items"` +} diff --git a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/bpfNsProgram_types.go b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/bpfNsProgram_types.go new file mode 100644 index 000000000..58688fa3d --- /dev/null +++ b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/bpfNsProgram_types.go @@ -0,0 +1,79 @@ +/* +Copyright 2024. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// All fields are required unless explicitly marked optional +// +kubebuilder:validation:Required +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1types "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +// +genclient +//+kubebuilder:object:root=true +//+kubebuilder:subresource:status + +// BpfNsProgram is the Schema for the Bpfnsprograms API +// +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.spec.type` +// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[0].reason` +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +type BpfNsProgram struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec BpfProgramSpec `json:"spec"` + // +optional + Status BpfProgramStatus `json:"status,omitempty"` +} + +//+kubebuilder:object:root=true + +// BpfNsProgramList contains a list of BpfProgram +type BpfNsProgramList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []BpfNsProgram `json:"items"` +} + +func (bp BpfNsProgram) GetName() string { + return bp.Name +} + +func (bp BpfNsProgram) GetUID() metav1types.UID { + return bp.UID +} + +func (bp BpfNsProgram) GetAnnotations() map[string]string { + return bp.Annotations +} + +func (bp BpfNsProgram) GetLabels() map[string]string { + return bp.Labels +} + +func (bp BpfNsProgram) GetStatus() *BpfProgramStatus { + return &bp.Status +} + +func (bp BpfNsProgram) GetClientObject() client.Object { + return &bp +} + +func (bpl BpfNsProgramList) GetItems() []BpfNsProgram { + return bpl.Items +} diff --git a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/bpfprogram_types.go b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/bpfProgram_types.go similarity index 80% rename from vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/bpfprogram_types.go rename to vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/bpfProgram_types.go index 9fa52c644..9e841bd44 100644 --- a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/bpfprogram_types.go +++ b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/bpfProgram_types.go @@ -20,6 +20,8 @@ package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1types "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" ) // +genclient @@ -69,3 +71,31 @@ type BpfProgramList struct { metav1.ListMeta `json:"metadata,omitempty"` Items []BpfProgram `json:"items"` } + +func (bp BpfProgram) GetName() string { + return bp.Name +} + +func (bp BpfProgram) GetUID() metav1types.UID { + return bp.UID +} + +func (bp BpfProgram) GetAnnotations() map[string]string { + return bp.Annotations +} + +func (bp BpfProgram) GetLabels() map[string]string { + return bp.Labels +} + +func (bp BpfProgram) GetStatus() *BpfProgramStatus { + return &bp.Status +} + +func (bp BpfProgram) GetClientObject() client.Object { + return &bp +} + +func (bpl BpfProgramList) GetItems() []BpfProgram { + return bpl.Items +} diff --git a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/kprobeProgram_types.go b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/kprobeProgram_types.go index b427e9c44..796a81da7 100644 --- a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/kprobeProgram_types.go +++ b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/kprobeProgram_types.go @@ -71,10 +71,6 @@ type KprobeProgramInfo struct { // +optional // +kubebuilder:default:=false RetProbe bool `json:"retprobe"` - - // // Host PID of container to attach the uprobe in. (Not supported yet by bpfman.) - // // +optional - // ContainerPid string `json:"containerpid"` } // KprobeProgramStatus defines the observed state of KprobeProgram diff --git a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/shared_types.go b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/shared_types.go index c31bd8eb4..7a6dca35f 100644 --- a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/shared_types.go +++ b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/shared_types.go @@ -53,6 +53,20 @@ type ContainerSelector struct { ContainerNames *[]string `json:"containernames,omitempty"` } +// ContainerNsSelector identifies a set of containers. It is different from ContainerSelector +// in that "Namespace" was removed. Namespace scoped programs can only attach to the namespace +// they are created in, so namespace at this level doesn't apply. +type ContainerNsSelector struct { + // Target pods. This field must be specified, to select all pods use + // standard metav1.LabelSelector semantics and make it empty. + Pods metav1.LabelSelector `json:"pods"` + + // Name(s) of container(s). If none are specified, all containers in the + // pod are selected. + // +optional + ContainerNames *[]string `json:"containernames,omitempty"` +} + // BpfProgramCommon defines the common attributes for all BPF programs type BpfProgramCommon struct { // BpfFunctionName is the name of the function that is the entry point for the BPF diff --git a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/tcNsProgram_types.go b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/tcNsProgram_types.go new file mode 100644 index 000000000..a8eca7372 --- /dev/null +++ b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/tcNsProgram_types.go @@ -0,0 +1,90 @@ +/* +Copyright 2024. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// All fields are required unless explicitly marked optional +// +kubebuilder:validation:Required +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +//+kubebuilder:object:root=true +//+kubebuilder:subresource:status +//+kubebuilder:resource:scope=Namespaced + +// TcNsProgram is the Schema for the TcNsProgram API +// +kubebuilder:printcolumn:name="BpfFunctionName",type=string,JSONPath=`.spec.bpffunctionname` +// +kubebuilder:printcolumn:name="NodeSelector",type=string,JSONPath=`.spec.nodeselector` +// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[0].reason` +// +kubebuilder:printcolumn:name="Priority",type=string,JSONPath=`.spec.priority`,priority=1 +// +kubebuilder:printcolumn:name="Direction",type=string,JSONPath=`.spec.direction`,priority=1 +// +kubebuilder:printcolumn:name="InterfaceSelector",type=string,JSONPath=`.spec.interfaceselector`,priority=1 +// +kubebuilder:printcolumn:name="ProceedOn",type=string,JSONPath=`.spec.proceedon`,priority=1 +type TcNsProgram struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TcNsProgramSpec `json:"spec"` + // +optional + Status TcProgramStatus `json:"status,omitempty"` +} + +// TcNsProgramSpec defines the desired state of TcNsProgram +type TcNsProgramSpec struct { + TcNsProgramInfo `json:",inline"` + BpfAppCommon `json:",inline"` +} + +// TcNsProgramInfo defines the tc program details +type TcNsProgramInfo struct { + BpfProgramCommon `json:",inline"` + + // Selector to determine the network interface (or interfaces) + InterfaceSelector InterfaceSelector `json:"interfaceselector"` + + // Containers identifies the set of containers in which to attach the eBPF + // program. + Containers ContainerNsSelector `json:"containers"` + + // Priority specifies the priority of the tc program in relation to + // other programs of the same type with the same attach point. It is a value + // from 0 to 1000 where lower values have higher precedence. + // +kubebuilder:validation:Minimum=0 + // +kubebuilder:validation:Maximum=1000 + Priority int32 `json:"priority"` + + // Direction specifies the direction of traffic the tc program should + // attach to for a given network device. + // +kubebuilder:validation:Enum=ingress;egress + Direction string `json:"direction"` + + // ProceedOn allows the user to call other tc programs in chain on this exit code. + // Multiple values are supported by repeating the parameter. + // +optional + // +kubebuilder:validation:MaxItems=11 + // +kubebuilder:default:={pipe,dispatcher_return} + ProceedOn []TcProceedOnValue `json:"proceedon"` +} + +// +kubebuilder:object:root=true +// TcNsProgramList contains a list of TcNsPrograms +type TcNsProgramList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TcNsProgram `json:"items"` +} diff --git a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/tcProgram_types.go b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/tcProgram_types.go index 24ed566ab..519234214 100644 --- a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/tcProgram_types.go +++ b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/tcProgram_types.go @@ -61,6 +61,12 @@ type TcProgramInfo struct { // Selector to determine the network interface (or interfaces) InterfaceSelector InterfaceSelector `json:"interfaceselector"` + // Containers identifies the set of containers in which to attach the eBPF + // program. If Containers is not specified, the BPF program will be attached + // in the root network namespace. + // +optional + Containers *ContainerSelector `json:"containers"` + // Priority specifies the priority of the tc program in relation to // other programs of the same type with the same attach point. It is a value // from 0 to 1000 where lower values have higher precedence. diff --git a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/tcxNsProgram_types.go b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/tcxNsProgram_types.go new file mode 100644 index 000000000..61b8c8df3 --- /dev/null +++ b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/tcxNsProgram_types.go @@ -0,0 +1,83 @@ +/* +Copyright 2024. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// All fields are required unless explicitly marked optional +// +kubebuilder:validation:Required +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +//+kubebuilder:object:root=true +//+kubebuilder:subresource:status +//+kubebuilder:resource:scope=Namespaced + +// TcxNsProgram is the Schema for the TcxNsProgram API +// +kubebuilder:printcolumn:name="BpfFunctionName",type=string,JSONPath=`.spec.bpffunctionname` +// +kubebuilder:printcolumn:name="NodeSelector",type=string,JSONPath=`.spec.nodeselector` +// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[0].reason` +// +kubebuilder:printcolumn:name="Direction",type=string,JSONPath=`.spec.direction`,priority=1 +// +kubebuilder:printcolumn:name="InterfaceSelector",type=string,JSONPath=`.spec.interfaceselector`,priority=1 +// +kubebuilder:printcolumn:name="Position",type=string,JSONPath=`.spec.position`,priority=1 +// +kubebuilder:printcolumn:name="Priority",type=string,JSONPath=`.spec.priority`,priority=1 +type TcxNsProgram struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TcxNsProgramSpec `json:"spec"` + // +optional + Status TcxProgramStatus `json:"status,omitempty"` +} + +// TcxNsProgramSpec defines the desired state of TcxNsProgram +type TcxNsProgramSpec struct { + TcxNsProgramInfo `json:",inline"` + BpfAppCommon `json:",inline"` +} + +// TcxNsProgramInfo defines the TCX Ns Program details +type TcxNsProgramInfo struct { + BpfProgramCommon `json:",inline"` + + // Selector to determine the network interface (or interfaces) + InterfaceSelector InterfaceSelector `json:"interfaceselector"` + + // Containers identifies the set of containers in which to attach the eBPF + // program. + Containers ContainerNsSelector `json:"containers"` + + // Direction specifies the direction of traffic the tcx program should + // attach to for a given network device. + // +kubebuilder:validation:Enum=ingress;egress + Direction string `json:"direction"` + + // Priority specifies the priority of the tc program in relation to + // other programs of the same type with the same attach point. It is a value + // from 0 to 1000 where lower values have higher precedence. + // +kubebuilder:validation:Minimum=0 + // +kubebuilder:validation:Maximum=1000 + Priority int32 `json:"priority"` +} + +// +kubebuilder:object:root=true +// TcxNsProgramList contains a list of TcxNsPrograms +type TcxNsProgramList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TcxNsProgram `json:"items"` +} diff --git a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/tcxProgram_types.go b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/tcxProgram_types.go index 08648ae87..e3de33c87 100644 --- a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/tcxProgram_types.go +++ b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/tcxProgram_types.go @@ -58,6 +58,12 @@ type TcxProgramInfo struct { // Selector to determine the network interface (or interfaces) InterfaceSelector InterfaceSelector `json:"interfaceselector"` + // Containers identifies the set of containers in which to attach the eBPF + // program. If Containers is not specified, the BPF program will be attached + // in the root network namespace. + // +optional + Containers *ContainerSelector `json:"containers"` + // Direction specifies the direction of traffic the tcx program should // attach to for a given network device. // +kubebuilder:validation:Enum=ingress;egress @@ -71,7 +77,7 @@ type TcxProgramInfo struct { Priority int32 `json:"priority"` } -// TcxProgramStatus defines the observed state of TcProgram +// TcxProgramStatus defines the observed state of TcxProgram type TcxProgramStatus struct { BpfProgramStatusCommon `json:",inline"` } diff --git a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/uprobeNsProgram_types.go b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/uprobeNsProgram_types.go new file mode 100644 index 000000000..2b8dd21e0 --- /dev/null +++ b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/uprobeNsProgram_types.go @@ -0,0 +1,95 @@ +/* +Copyright 2024. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// All fields are required unless explicitly marked optional +// +kubebuilder:validation:Required +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +//+kubebuilder:object:root=true +//+kubebuilder:subresource:status +//+kubebuilder:resource:scope=Namespaced + +// UprobeNsProgram is the Schema for the UprobeNsPrograms API +// +kubebuilder:printcolumn:name="BpfFunctionName",type=string,JSONPath=`.spec.bpffunctionname` +// +kubebuilder:printcolumn:name="NodeSelector",type=string,JSONPath=`.spec.nodeselector` +// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[0].reason` +// +kubebuilder:printcolumn:name="FunctionName",type=string,JSONPath=`.spec.func_name`,priority=1 +// +kubebuilder:printcolumn:name="Offset",type=integer,JSONPath=`.spec.offset`,priority=1 +// +kubebuilder:printcolumn:name="Target",type=string,JSONPath=`.spec.target`,priority=1 +// +kubebuilder:printcolumn:name="RetProbe",type=boolean,JSONPath=`.spec.retprobe`,priority=1 +// +kubebuilder:printcolumn:name="Pid",type=integer,JSONPath=`.spec.pid`,priority=1 +type UprobeNsProgram struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec UprobeNsProgramSpec `json:"spec"` + // +optional + Status UprobeProgramStatus `json:"status,omitempty"` +} + +// UprobeNsProgramSpec defines the desired state of UprobeProgram +type UprobeNsProgramSpec struct { + UprobeNsProgramInfo `json:",inline"` + BpfAppCommon `json:",inline"` +} + +// UprobeProgramInfo contains the information about the uprobe program +type UprobeNsProgramInfo struct { + BpfProgramCommon `json:",inline"` + + // Function to attach the uprobe to. + // +optional + FunctionName string `json:"func_name"` + + // Offset added to the address of the function for uprobe. + // +optional + // +kubebuilder:default:=0 + Offset uint64 `json:"offset"` + + // Library name or the absolute path to a binary or library. + Target string `json:"target"` + + // Whether the program is a uretprobe. Default is false + // +optional + // +kubebuilder:default:=false + RetProbe bool `json:"retprobe"` + + // Only execute uprobe for given process identification number (PID). If PID + // is not provided, uprobe executes for all PIDs. + // +optional + Pid int32 `json:"pid"` + + // Containers identifies the set of containers in which to attach the uprobe. + // If Containers is not specified, the uprobe will be attached in the + // bpfman-agent container. The ContainerNsSelector is very flexible and even + // allows the selection of all containers in a cluster. If an attempt is + // made to attach uprobes to too many containers, it can have a negative + // impact on on the cluster. + Containers ContainerNsSelector `json:"containers"` +} + +// +kubebuilder:object:root=true +// UprobeNsProgramList contains a list of UprobeNsPrograms +type UprobeNsProgramList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []UprobeNsProgram `json:"items"` +} diff --git a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/uprobeProgram_types.go b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/uprobeProgram_types.go index b98500aad..664401145 100644 --- a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/uprobeProgram_types.go +++ b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/uprobeProgram_types.go @@ -83,7 +83,7 @@ type UprobeProgramInfo struct { // +optional Pid int32 `json:"pid"` - // Containers identifes the set of containers in which to attach the uprobe. + // Containers identifies the set of containers in which to attach the uprobe. // If Containers is not specified, the uprobe will be attached in the // bpfman-agent container. The ContainerSelector is very flexible and even // allows the selection of all containers in a cluster. If an attempt is diff --git a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/xdpNsProgram_types.go b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/xdpNsProgram_types.go new file mode 100644 index 000000000..d0619c074 --- /dev/null +++ b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/xdpNsProgram_types.go @@ -0,0 +1,83 @@ +/* +Copyright 2024. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// All fields are required unless explicitly marked optional +// +kubebuilder:validation:Required +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +//+kubebuilder:object:root=true +//+kubebuilder:subresource:status +//+kubebuilder:resource:scope=Namespaced + +// XdpNsProgram is the Schema for the XdpNsPrograms API +// +kubebuilder:printcolumn:name="BpfFunctionName",type=string,JSONPath=`.spec.bpffunctionname` +// +kubebuilder:printcolumn:name="NodeSelector",type=string,JSONPath=`.spec.nodeselector` +// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[0].reason` +// +kubebuilder:printcolumn:name="Priority",type=string,JSONPath=`.spec.priority`,priority=1 +// +kubebuilder:printcolumn:name="InterfaceSelector",type=string,JSONPath=`.spec.interfaceselector`,priority=1 +// +kubebuilder:printcolumn:name="ProceedOn",type=string,JSONPath=`.spec.proceedon`,priority=1 +type XdpNsProgram struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec XdpNsProgramSpec `json:"spec"` + // +optional + Status XdpProgramStatus `json:"status,omitempty"` +} + +// XdpNsProgramSpec defines the desired state of XdpNsProgram +type XdpNsProgramSpec struct { + XdpNsProgramInfo `json:",inline"` + BpfAppCommon `json:",inline"` +} + +// XdpNsProgramInfo defines the common fields for all XdpProgram types +type XdpNsProgramInfo struct { + BpfProgramCommon `json:",inline"` + // Selector to determine the network interface (or interfaces) + InterfaceSelector InterfaceSelector `json:"interfaceselector"` + + // Containers identifies the set of containers in which to attach the eBPF + // program. + Containers ContainerNsSelector `json:"containers"` + + // Priority specifies the priority of the bpf program in relation to + // other programs of the same type with the same attach point. It is a value + // from 0 to 1000 where lower values have higher precedence. + // +kubebuilder:validation:Minimum=0 + // +kubebuilder:validation:Maximum=1000 + Priority int32 `json:"priority"` + + // ProceedOn allows the user to call other xdp programs in chain on this exit code. + // Multiple values are supported by repeating the parameter. + // +optional + // +kubebuilder:validation:MaxItems=6 + // +kubebuilder:default:={pass,dispatcher_return} + ProceedOn []XdpProceedOnValue `json:"proceedon"` +} + +// +kubebuilder:object:root=true +// XdpProgramList contains a list of XdpPrograms +type XdpNsProgramList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []XdpNsProgram `json:"items"` +} diff --git a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/xdpProgram_types.go b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/xdpProgram_types.go index 8ec1ac072..f39c31981 100644 --- a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/xdpProgram_types.go +++ b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/xdpProgram_types.go @@ -59,6 +59,12 @@ type XdpProgramInfo struct { // Selector to determine the network interface (or interfaces) InterfaceSelector InterfaceSelector `json:"interfaceselector"` + // Containers identifies the set of containers in which to attach the eBPF + // program. If Containers is not specified, the BPF program will be attached + // in the root network namespace. + // +optional + Containers *ContainerSelector `json:"containers"` + // Priority specifies the priority of the bpf program in relation to // other programs of the same type with the same attach point. It is a value // from 0 to 1000 where lower values have higher precedence. diff --git a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/zz_generated.deepcopy.go index 80f3b52cd..54af5b645 100644 --- a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/zz_generated.deepcopy.go @@ -221,6 +221,187 @@ func (in *BpfApplicationStatus) DeepCopy() *BpfApplicationStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BpfNsApplication) DeepCopyInto(out *BpfNsApplication) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BpfNsApplication. +func (in *BpfNsApplication) DeepCopy() *BpfNsApplication { + if in == nil { + return nil + } + out := new(BpfNsApplication) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BpfNsApplication) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BpfNsApplicationList) DeepCopyInto(out *BpfNsApplicationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]BpfNsApplication, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BpfNsApplicationList. +func (in *BpfNsApplicationList) DeepCopy() *BpfNsApplicationList { + if in == nil { + return nil + } + out := new(BpfNsApplicationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BpfNsApplicationList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BpfNsApplicationProgram) DeepCopyInto(out *BpfNsApplicationProgram) { + *out = *in + if in.XDP != nil { + in, out := &in.XDP, &out.XDP + *out = new(XdpNsProgramInfo) + (*in).DeepCopyInto(*out) + } + if in.TC != nil { + in, out := &in.TC, &out.TC + *out = new(TcNsProgramInfo) + (*in).DeepCopyInto(*out) + } + if in.TCX != nil { + in, out := &in.TCX, &out.TCX + *out = new(TcxNsProgramInfo) + (*in).DeepCopyInto(*out) + } + if in.Uprobe != nil { + in, out := &in.Uprobe, &out.Uprobe + *out = new(UprobeNsProgramInfo) + (*in).DeepCopyInto(*out) + } + if in.Uretprobe != nil { + in, out := &in.Uretprobe, &out.Uretprobe + *out = new(UprobeNsProgramInfo) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BpfNsApplicationProgram. +func (in *BpfNsApplicationProgram) DeepCopy() *BpfNsApplicationProgram { + if in == nil { + return nil + } + out := new(BpfNsApplicationProgram) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BpfNsApplicationSpec) DeepCopyInto(out *BpfNsApplicationSpec) { + *out = *in + in.BpfAppCommon.DeepCopyInto(&out.BpfAppCommon) + if in.Programs != nil { + in, out := &in.Programs, &out.Programs + *out = make([]BpfNsApplicationProgram, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BpfNsApplicationSpec. +func (in *BpfNsApplicationSpec) DeepCopy() *BpfNsApplicationSpec { + if in == nil { + return nil + } + out := new(BpfNsApplicationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BpfNsProgram) DeepCopyInto(out *BpfNsProgram) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BpfNsProgram. +func (in *BpfNsProgram) DeepCopy() *BpfNsProgram { + if in == nil { + return nil + } + out := new(BpfNsProgram) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BpfNsProgram) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BpfNsProgramList) DeepCopyInto(out *BpfNsProgramList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]BpfNsProgram, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BpfNsProgramList. +func (in *BpfNsProgramList) DeepCopy() *BpfNsProgramList { + if in == nil { + return nil + } + out := new(BpfNsProgramList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BpfNsProgramList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BpfProgram) DeepCopyInto(out *BpfProgram) { *out = *in @@ -400,6 +581,31 @@ func (in *BytecodeSelector) DeepCopy() *BytecodeSelector { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ContainerNsSelector) DeepCopyInto(out *ContainerNsSelector) { + *out = *in + in.Pods.DeepCopyInto(&out.Pods) + if in.ContainerNames != nil { + in, out := &in.ContainerNames, &out.ContainerNames + *out = new([]string) + if **in != nil { + in, out := *in, *out + *out = make([]string, len(*in)) + copy(*out, *in) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerNsSelector. +func (in *ContainerNsSelector) DeepCopy() *ContainerNsSelector { + if in == nil { + return nil + } + out := new(ContainerNsSelector) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ContainerSelector) DeepCopyInto(out *ContainerSelector) { *out = *in @@ -793,6 +999,105 @@ func (in *KprobeProgramStatus) DeepCopy() *KprobeProgramStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TcNsProgram) DeepCopyInto(out *TcNsProgram) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TcNsProgram. +func (in *TcNsProgram) DeepCopy() *TcNsProgram { + if in == nil { + return nil + } + out := new(TcNsProgram) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TcNsProgram) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TcNsProgramInfo) DeepCopyInto(out *TcNsProgramInfo) { + *out = *in + in.BpfProgramCommon.DeepCopyInto(&out.BpfProgramCommon) + in.InterfaceSelector.DeepCopyInto(&out.InterfaceSelector) + in.Containers.DeepCopyInto(&out.Containers) + if in.ProceedOn != nil { + in, out := &in.ProceedOn, &out.ProceedOn + *out = make([]TcProceedOnValue, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TcNsProgramInfo. +func (in *TcNsProgramInfo) DeepCopy() *TcNsProgramInfo { + if in == nil { + return nil + } + out := new(TcNsProgramInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TcNsProgramList) DeepCopyInto(out *TcNsProgramList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TcNsProgram, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TcNsProgramList. +func (in *TcNsProgramList) DeepCopy() *TcNsProgramList { + if in == nil { + return nil + } + out := new(TcNsProgramList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TcNsProgramList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TcNsProgramSpec) DeepCopyInto(out *TcNsProgramSpec) { + *out = *in + in.TcNsProgramInfo.DeepCopyInto(&out.TcNsProgramInfo) + in.BpfAppCommon.DeepCopyInto(&out.BpfAppCommon) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TcNsProgramSpec. +func (in *TcNsProgramSpec) DeepCopy() *TcNsProgramSpec { + if in == nil { + return nil + } + out := new(TcNsProgramSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TcProgram) DeepCopyInto(out *TcProgram) { *out = *in @@ -825,6 +1130,11 @@ func (in *TcProgramInfo) DeepCopyInto(out *TcProgramInfo) { *out = *in in.BpfProgramCommon.DeepCopyInto(&out.BpfProgramCommon) in.InterfaceSelector.DeepCopyInto(&out.InterfaceSelector) + if in.Containers != nil { + in, out := &in.Containers, &out.Containers + *out = new(ContainerSelector) + (*in).DeepCopyInto(*out) + } if in.ProceedOn != nil { in, out := &in.ProceedOn, &out.ProceedOn *out = make([]TcProceedOnValue, len(*in)) @@ -907,6 +1217,100 @@ func (in *TcProgramStatus) DeepCopy() *TcProgramStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TcxNsProgram) DeepCopyInto(out *TcxNsProgram) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TcxNsProgram. +func (in *TcxNsProgram) DeepCopy() *TcxNsProgram { + if in == nil { + return nil + } + out := new(TcxNsProgram) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TcxNsProgram) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TcxNsProgramInfo) DeepCopyInto(out *TcxNsProgramInfo) { + *out = *in + in.BpfProgramCommon.DeepCopyInto(&out.BpfProgramCommon) + in.InterfaceSelector.DeepCopyInto(&out.InterfaceSelector) + in.Containers.DeepCopyInto(&out.Containers) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TcxNsProgramInfo. +func (in *TcxNsProgramInfo) DeepCopy() *TcxNsProgramInfo { + if in == nil { + return nil + } + out := new(TcxNsProgramInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TcxNsProgramList) DeepCopyInto(out *TcxNsProgramList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TcxNsProgram, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TcxNsProgramList. +func (in *TcxNsProgramList) DeepCopy() *TcxNsProgramList { + if in == nil { + return nil + } + out := new(TcxNsProgramList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TcxNsProgramList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TcxNsProgramSpec) DeepCopyInto(out *TcxNsProgramSpec) { + *out = *in + in.TcxNsProgramInfo.DeepCopyInto(&out.TcxNsProgramInfo) + in.BpfAppCommon.DeepCopyInto(&out.BpfAppCommon) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TcxNsProgramSpec. +func (in *TcxNsProgramSpec) DeepCopy() *TcxNsProgramSpec { + if in == nil { + return nil + } + out := new(TcxNsProgramSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TcxProgram) DeepCopyInto(out *TcxProgram) { *out = *in @@ -939,6 +1343,11 @@ func (in *TcxProgramInfo) DeepCopyInto(out *TcxProgramInfo) { *out = *in in.BpfProgramCommon.DeepCopyInto(&out.BpfProgramCommon) in.InterfaceSelector.DeepCopyInto(&out.InterfaceSelector) + if in.Containers != nil { + in, out := &in.Containers, &out.Containers + *out = new(ContainerSelector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TcxProgramInfo. @@ -1129,6 +1538,99 @@ func (in *TracepointProgramStatus) DeepCopy() *TracepointProgramStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UprobeNsProgram) DeepCopyInto(out *UprobeNsProgram) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UprobeNsProgram. +func (in *UprobeNsProgram) DeepCopy() *UprobeNsProgram { + if in == nil { + return nil + } + out := new(UprobeNsProgram) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UprobeNsProgram) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UprobeNsProgramInfo) DeepCopyInto(out *UprobeNsProgramInfo) { + *out = *in + in.BpfProgramCommon.DeepCopyInto(&out.BpfProgramCommon) + in.Containers.DeepCopyInto(&out.Containers) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UprobeNsProgramInfo. +func (in *UprobeNsProgramInfo) DeepCopy() *UprobeNsProgramInfo { + if in == nil { + return nil + } + out := new(UprobeNsProgramInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UprobeNsProgramList) DeepCopyInto(out *UprobeNsProgramList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]UprobeNsProgram, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UprobeNsProgramList. +func (in *UprobeNsProgramList) DeepCopy() *UprobeNsProgramList { + if in == nil { + return nil + } + out := new(UprobeNsProgramList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UprobeNsProgramList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UprobeNsProgramSpec) DeepCopyInto(out *UprobeNsProgramSpec) { + *out = *in + in.UprobeNsProgramInfo.DeepCopyInto(&out.UprobeNsProgramInfo) + in.BpfAppCommon.DeepCopyInto(&out.BpfAppCommon) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UprobeNsProgramSpec. +func (in *UprobeNsProgramSpec) DeepCopy() *UprobeNsProgramSpec { + if in == nil { + return nil + } + out := new(UprobeNsProgramSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *UprobeProgram) DeepCopyInto(out *UprobeProgram) { *out = *in @@ -1242,6 +1744,105 @@ func (in *UprobeProgramStatus) DeepCopy() *UprobeProgramStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *XdpNsProgram) DeepCopyInto(out *XdpNsProgram) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XdpNsProgram. +func (in *XdpNsProgram) DeepCopy() *XdpNsProgram { + if in == nil { + return nil + } + out := new(XdpNsProgram) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *XdpNsProgram) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *XdpNsProgramInfo) DeepCopyInto(out *XdpNsProgramInfo) { + *out = *in + in.BpfProgramCommon.DeepCopyInto(&out.BpfProgramCommon) + in.InterfaceSelector.DeepCopyInto(&out.InterfaceSelector) + in.Containers.DeepCopyInto(&out.Containers) + if in.ProceedOn != nil { + in, out := &in.ProceedOn, &out.ProceedOn + *out = make([]XdpProceedOnValue, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XdpNsProgramInfo. +func (in *XdpNsProgramInfo) DeepCopy() *XdpNsProgramInfo { + if in == nil { + return nil + } + out := new(XdpNsProgramInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *XdpNsProgramList) DeepCopyInto(out *XdpNsProgramList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]XdpNsProgram, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XdpNsProgramList. +func (in *XdpNsProgramList) DeepCopy() *XdpNsProgramList { + if in == nil { + return nil + } + out := new(XdpNsProgramList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *XdpNsProgramList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *XdpNsProgramSpec) DeepCopyInto(out *XdpNsProgramSpec) { + *out = *in + in.XdpNsProgramInfo.DeepCopyInto(&out.XdpNsProgramInfo) + in.BpfAppCommon.DeepCopyInto(&out.BpfAppCommon) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XdpNsProgramSpec. +func (in *XdpNsProgramSpec) DeepCopy() *XdpNsProgramSpec { + if in == nil { + return nil + } + out := new(XdpNsProgramSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *XdpProgram) DeepCopyInto(out *XdpProgram) { *out = *in @@ -1274,6 +1875,11 @@ func (in *XdpProgramInfo) DeepCopyInto(out *XdpProgramInfo) { *out = *in in.BpfProgramCommon.DeepCopyInto(&out.BpfProgramCommon) in.InterfaceSelector.DeepCopyInto(&out.InterfaceSelector) + if in.Containers != nil { + in, out := &in.Containers, &out.Containers + *out = new(ContainerSelector) + (*in).DeepCopyInto(*out) + } if in.ProceedOn != nil { in, out := &in.ProceedOn, &out.ProceedOn *out = make([]XdpProceedOnValue, len(*in)) diff --git a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/zz_generated.register.go b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/zz_generated.register.go index 5b55645af..569ccddcd 100644 --- a/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/zz_generated.register.go +++ b/vendor/github.com/bpfman/bpfman-operator/apis/v1alpha1/zz_generated.register.go @@ -63,6 +63,10 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &BpfApplication{}, &BpfApplicationList{}, + &BpfNsApplication{}, + &BpfNsApplicationList{}, + &BpfNsProgram{}, + &BpfNsProgramList{}, &BpfProgram{}, &BpfProgramList{}, &FentryProgram{}, @@ -71,14 +75,22 @@ func addKnownTypes(scheme *runtime.Scheme) error { &FexitProgramList{}, &KprobeProgram{}, &KprobeProgramList{}, + &TcNsProgram{}, + &TcNsProgramList{}, &TcProgram{}, &TcProgramList{}, + &TcxNsProgram{}, + &TcxNsProgramList{}, &TcxProgram{}, &TcxProgramList{}, &TracepointProgram{}, &TracepointProgramList{}, + &UprobeNsProgram{}, + &UprobeNsProgramList{}, &UprobeProgram{}, &UprobeProgramList{}, + &XdpNsProgram{}, + &XdpNsProgramList{}, &XdpProgram{}, &XdpProgramList{}, ) diff --git a/vendor/modules.txt b/vendor/modules.txt index 75844a3e2..d171d95c4 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -35,7 +35,7 @@ github.com/beorn7/perks/quantile # github.com/blang/semver/v4 v4.0.0 ## explicit; go 1.14 github.com/blang/semver/v4 -# github.com/bpfman/bpfman-operator v0.5.5-0.20241023163832-0bf84bbd3927 +# github.com/bpfman/bpfman-operator v0.5.5 ## explicit; go 1.22.0 github.com/bpfman/bpfman-operator/apis/v1alpha1 # github.com/cenkalti/backoff/v4 v4.3.0