forked from bpfman/bpfman
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request bpfman#1047 from Billy99/billy99-k8s-fentry-fexit
bpfman-operator: Add K8s support for fentry and fexit
- Loading branch information
Showing
50 changed files
with
4,176 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
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 | ||
// +genclient:nonNamespaced | ||
//+kubebuilder:object:root=true | ||
//+kubebuilder:subresource:status | ||
//+kubebuilder:resource:scope=Cluster | ||
|
||
// FentryProgram is the Schema for the FentryPrograms 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 | ||
type FentryProgram struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec FentryProgramSpec `json:"spec"` | ||
// +optional | ||
Status FentryProgramStatus `json:"status,omitempty"` | ||
} | ||
|
||
// FentryProgramSpec defines the desired state of FentryProgram | ||
// +kubebuilder:printcolumn:name="FunctionName",type=string,JSONPath=`.spec.func_name` | ||
type FentryProgramSpec struct { | ||
BpfProgramCommon `json:",inline"` | ||
|
||
// Function to attach the fentry to. | ||
FunctionName string `json:"func_name"` | ||
} | ||
|
||
// FentryProgramStatus defines the observed state of FentryProgram | ||
type FentryProgramStatus struct { | ||
// Conditions houses the global cluster state for the FentryProgram. The explicit | ||
// condition types are defined internally. | ||
// +patchMergeKey=type | ||
// +patchStrategy=merge | ||
// +listType=map | ||
// +listMapKey=type | ||
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` | ||
} | ||
|
||
// +kubebuilder:object:root=true | ||
// FentryProgramList contains a list of FentryPrograms | ||
type FentryProgramList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []FentryProgram `json:"items"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
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 | ||
// +genclient:nonNamespaced | ||
//+kubebuilder:object:root=true | ||
//+kubebuilder:subresource:status | ||
//+kubebuilder:resource:scope=Cluster | ||
|
||
// FexitProgram is the Schema for the FexitPrograms 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 | ||
type FexitProgram struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec FexitProgramSpec `json:"spec"` | ||
// +optional | ||
Status FexitProgramStatus `json:"status,omitempty"` | ||
} | ||
|
||
// FexitProgramSpec defines the desired state of FexitProgram | ||
// +kubebuilder:printcolumn:name="FunctionName",type=string,JSONPath=`.spec.func_name` | ||
type FexitProgramSpec struct { | ||
BpfProgramCommon `json:",inline"` | ||
|
||
// Function to attach the fexit to. | ||
FunctionName string `json:"func_name"` | ||
} | ||
|
||
// FexitProgramStatus defines the observed state of FexitProgram | ||
type FexitProgramStatus struct { | ||
// Conditions houses the global cluster state for the FexitProgram. The explicit | ||
// condition types are defined internally. | ||
// +patchMergeKey=type | ||
// +patchStrategy=merge | ||
// +listType=map | ||
// +listMapKey=type | ||
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` | ||
} | ||
|
||
// +kubebuilder:object:root=true | ||
// FexitProgramList contains a list of FexitPrograms | ||
type FexitProgramList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []FexitProgram `json:"items"` | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.