v1

package
v1.0.0-pre2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2025 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the kive v1 API group +kubebuilder:object:generate=true +groupName=kivebpf.san7o.github.io

Index

Constants

View Source
const (
	Namespace = "kivebpf-system"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "kivebpf.san7o.github.io", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type ContainerMetadata

type ContainerMetadata struct {
	// Container id
	Id string `json:"id"`
	// Container name
	Name string `json:"name"`
}

Information about the container

func (*ContainerMetadata) DeepCopy

func (in *ContainerMetadata) DeepCopy() *ContainerMetadata

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerMetadata.

func (*ContainerMetadata) DeepCopyInto

func (in *ContainerMetadata) DeepCopyInto(out *ContainerMetadata)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KiveAlert

type KiveAlert struct {
	// KiveAlert version
	AlertVersion string `json:"kive-alert-version"`
	// The policy that triggered the alert
	PolicyName string `json:"kive-policy-name"`
	// Alert creation time
	Timestamp string `json:"timestamp"` // RFC 3339
	// Additional information
	Metadata KiveAlertMetadata `json:"metadata"`
	// User specified metadata (from KivePolicy)
	CustomMetadata map[string]string `json:"custom-metadata"`
	// Information about the pod where the file lives
	Pod PodMetadata `json:"pod"`
	// Information about the node
	Node NodeMetadata `json:"node"`
	// Information about the process that accessed the file
	Process ProcessMetadata `json:"process"`
}

File access alert

func (*KiveAlert) DeepCopy

func (in *KiveAlert) DeepCopy() *KiveAlert

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KiveAlert.

func (*KiveAlert) DeepCopyInto

func (in *KiveAlert) DeepCopyInto(out *KiveAlert)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KiveAlertMetadata

type KiveAlertMetadata struct {
	// File path
	Path string `json:"path"`
	// Inode number of the file
	Inode uint64 `json:"inode"`
	// Unix access permission mask
	Mask int32 `json:"mask"`
	// ID of the kernel where the alert was triggered
	KernelID string `json:"kernel-id"`
	// Callback URI
	Callback string `json:"callback"`
}

Additional information

func (*KiveAlertMetadata) DeepCopy

func (in *KiveAlertMetadata) DeepCopy() *KiveAlertMetadata

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KiveAlertMetadata.

func (*KiveAlertMetadata) DeepCopyInto

func (in *KiveAlertMetadata) DeepCopyInto(out *KiveAlertMetadata)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KiveData

type KiveData struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec KiveDataSpec `json:"spec,omitempty"`
}

func (*KiveData) ConvertFrom

func (dst *KiveData) ConvertFrom(srcRaw conversion.Hub) error

From v2alpha1 to v1

func (*KiveData) ConvertTo

func (src *KiveData) ConvertTo(dstRaw conversion.Hub) error

From v1 to v2alpha1

func (*KiveData) DeepCopy

func (in *KiveData) DeepCopy() *KiveData

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KiveData.

func (*KiveData) DeepCopyInto

func (in *KiveData) DeepCopyInto(out *KiveData)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KiveData) DeepCopyObject

func (in *KiveData) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KiveDataList

type KiveDataList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []KiveData `json:"items"`
}

func (*KiveDataList) DeepCopy

func (in *KiveDataList) DeepCopy() *KiveDataList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KiveDataList.

func (*KiveDataList) DeepCopyInto

func (in *KiveDataList) DeepCopyInto(out *KiveDataList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KiveDataList) DeepCopyObject

func (in *KiveDataList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KiveDataSpec

type KiveDataSpec struct {
	// The inode number of the file
	InodeNo uint64 `json:"inode-no,omitempty"`
	// The device number of the inode
	DevID uint32 `json:"dev-id,omitempty"`
	// (optional) Additional information
	Metadata map[string]string `json:"metadata,omitempty"`
}

KiveDataSpec defines the desired state of KiveData

func (*KiveDataSpec) DeepCopy

func (in *KiveDataSpec) DeepCopy() *KiveDataSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KiveDataSpec.

func (*KiveDataSpec) DeepCopyInto

func (in *KiveDataSpec) DeepCopyInto(out *KiveDataSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KivePolicy

type KivePolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec KivePolicySpec `json:"spec,omitempty"`
}

func (*KivePolicy) ConvertFrom

func (dst *KivePolicy) ConvertFrom(srcRaw conversion.Hub) error

From v2alpha1 to v1

func (*KivePolicy) ConvertTo

func (src *KivePolicy) ConvertTo(dstRaw conversion.Hub) error

From v1 to v2alpha1

func (*KivePolicy) DeepCopy

func (in *KivePolicy) DeepCopy() *KivePolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KivePolicy.

func (*KivePolicy) DeepCopyInto

func (in *KivePolicy) DeepCopyInto(out *KivePolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KivePolicy) DeepCopyObject

func (in *KivePolicy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KivePolicyList

type KivePolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []KivePolicy `json:"items"`
}

func (*KivePolicyList) DeepCopy

func (in *KivePolicyList) DeepCopy() *KivePolicyList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KivePolicyList.

func (*KivePolicyList) DeepCopyInto

func (in *KivePolicyList) DeepCopyInto(out *KivePolicyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KivePolicyList) DeepCopyObject

func (in *KivePolicyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KivePolicySpec

type KivePolicySpec struct {
	// Version for KiveAlert output
	AlertVersion string `json:"alertVersion,omitempty"`
	// List of traps
	Traps []KiveTrap `json:"traps,omitempty"`
}

func (*KivePolicySpec) DeepCopy

func (in *KivePolicySpec) DeepCopy() *KivePolicySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KivePolicySpec.

func (*KivePolicySpec) DeepCopyInto

func (in *KivePolicySpec) DeepCopyInto(out *KivePolicySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KiveTrap

type KiveTrap struct {
	// Specifies which path to monitor
	Path string `json:"path,omitempty"`
	// (optional) Whether to create the file or not if It was not found
	Create bool `json:"create,omitempty"`
	// (optional) The permissions of the file to be created if create is set to true
	Mode uint32 `json:"mode,omitempty"`
	// (optional) Send an HTTP POST request to this endpoint
	Callback string `json:"callback,omitempty"`
	// (optional) Additional information for this trap
	Metadata map[string]string `json:"metadata,omitempty"`
	// Match any of the following items (logical OR), at least one must be present
	MatchAny []KiveTrapMatch `json:"matchAny,omitempty"`
}

func (*KiveTrap) DeepCopy

func (in *KiveTrap) DeepCopy() *KiveTrap

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KiveTrap.

func (*KiveTrap) DeepCopyInto

func (in *KiveTrap) DeepCopyInto(out *KiveTrap)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KiveTrapMatch

type KiveTrapMatch struct {
	// Filter pods by name
	PodName string `json:"pod,omitempty"`
	// Filter container by name.
	//  - if this field is prepended by "regex:", the rest of the string
	//    will represent a regular expression matched with go regexp
	//    library (https://golang.org/s/re2syntax)
	//  - if the field is prepended by "glob:", then this is a
	//    filesystem-style regex, as described in go filepath.Match
	//    library (https://pkg.go.dev/path/filepath#Match)
	//  - otherwise, the name of the container will be compared exactly
	ContainerName string `json:"containerName,omitempty"`
	// Filter pods by namespace
	Namespace string `json:"namespace,omitempty"`
	// Filter pods by IP
	IP string `json:"ip,omitempty"`
	// Filter pods by label
	MatchLabels map[string]string `json:"matchLabels,omitempty"`
}

Match all the following optional fields (logical AND)

func (*KiveTrapMatch) DeepCopy

func (in *KiveTrapMatch) DeepCopy() *KiveTrapMatch

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KiveTrapMatch.

func (*KiveTrapMatch) DeepCopyInto

func (in *KiveTrapMatch) DeepCopyInto(out *KiveTrapMatch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeMetadata

type NodeMetadata struct {
	// Name of the node
	Name string `json:"name"`
}

Information about the node

func (*NodeMetadata) DeepCopy

func (in *NodeMetadata) DeepCopy() *NodeMetadata

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMetadata.

func (*NodeMetadata) DeepCopyInto

func (in *NodeMetadata) DeepCopyInto(out *NodeMetadata)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodMetadata

type PodMetadata struct {
	// Pod name
	Name string `json:"name"`
	// Pod namespace
	Namespace string `json:"namespace"`
	// Pod ip
	Ip string `json:"ip"`
	// Information about the container
	Container ContainerMetadata `json:"container"`
}

Information about the pod where the file lives

func (*PodMetadata) DeepCopy

func (in *PodMetadata) DeepCopy() *PodMetadata

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMetadata.

func (*PodMetadata) DeepCopyInto

func (in *PodMetadata) DeepCopyInto(out *PodMetadata)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProcessMetadata

type ProcessMetadata struct {
	// Process ID
	Pid int32 `json:"pid"`
	// Thread group ID
	Tgid uint32 `json:"tgid"`
	// User ID
	Uid uint32 `json:"uid"`
	// Group ID
	Gid uint32 `json:"gid"`
	// Process binary
	Binary string `json:"binary"`
	// Current Working Directory
	Cwd string `json:"cwd"`
	// Arguments to the Binary
	Arguments string `json:"arguments"`
}

Information related to the process that accessed the file

func (*ProcessMetadata) DeepCopy

func (in *ProcessMetadata) DeepCopy() *ProcessMetadata

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProcessMetadata.

func (*ProcessMetadata) DeepCopyInto

func (in *ProcessMetadata) DeepCopyInto(out *ProcessMetadata)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL