internal

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XdpProgramInterface         = "bpfman.io.xdpprogramcontroller/interface"
	TcProgramInterface          = "bpfman.io.tcprogramcontroller/interface"
	TracepointProgramTracepoint = "bpfman.io.tracepointprogramcontroller/tracepoint"
	KprobeProgramFunction       = "bpfman.io.kprobeprogramcontroller/function"
	UprobeProgramTarget         = "bpfman.io.uprobeprogramcontroller/target"
	UprobeContainerPid          = "bpfman.io.uprobeprogramcontroller/containerpid"
	UprobeNoContainersOnNode    = "bpfman.io.uprobeprogramcontroller/nocontainersonnode"
	FentryProgramFunction       = "bpfman.io.fentryprogramcontroller/function"
	FexitProgramFunction        = "bpfman.io.fexitprogramcontroller/function"
	BpfProgramOwnerLabel        = "bpfman.io/ownedByProgram"
	K8sHostLabel                = "kubernetes.io/hostname"
	DiscoveredLabel             = "bpfman.io/discoveredProgram"
	IdAnnotation                = "bpfman.io/ProgramId"
	UuidMetadataKey             = "bpfman.io/uuid"
	ProgramNameKey              = "bpfman.io/ProgramName"
	BpfmanNs                    = "bpfman"
	BpfmanOperatorName          = "bpfman-operator"
	BpfmanDsName                = "bpfman-daemon"
	BpfmanConfigName            = "bpfman-config"
	BpfmanCsiDriverName         = "csi.bpfman.io"
	BpfmanContainerName         = "bpfman"
	BpfmanAgentContainerName    = "bpfman-agent"
	BpfmanDaemonManifestPath    = "./config/bpfman-deployment/daemonset.yaml"
	BpfmanCsiDriverPath         = "./config/bpfman-deployment/csidriverinfo.yaml"
	BpfmanMapFs                 = "/run/bpfman/fs/maps"
	DefaultType                 = "tcp"
	DefaultPath                 = "/run/bpfman-sock/bpfman.sock"
	DefaultPort                 = 50051
	DefaultEnabled              = true
)
View Source
const (
	// BpfmanOperatorFinalizer is the finalizer that holds a *Program from
	// deletion until cleanup can be performed.
	BpfmanOperatorFinalizer = "bpfman.io.operator/finalizer"
	// XdpProgramControllerFinalizer is the finalizer that holds an Xdp BpfProgram
	// object from deletion until cleanup can be performed.
	XdpProgramControllerFinalizer = "bpfman.io.xdpprogramcontroller/finalizer"
	// TcProgramControllerFinalizer is the finalizer that holds an Tc BpfProgram
	// object from deletion until cleanup can be performed.
	TcProgramControllerFinalizer = "bpfman.io.tcprogramcontroller/finalizer"
	// TracepointProgramControllerFinalizer is the finalizer that holds an Tracepoint
	// BpfProgram object from deletion until cleanup can be performed.
	TracepointProgramControllerFinalizer = "bpfman.io.tracepointprogramcontroller/finalizer"
	// KprobeProgramControllerFinalizer is the finalizer that holds a Kprobe
	// BpfProgram object from deletion until cleanup can be performed.
	KprobeProgramControllerFinalizer = "bpfman.io.kprobeprogramcontroller/finalizer"
	// UprobeProgramControllerFinalizer is the finalizer that holds a Uprobe
	// BpfProgram object from deletion until cleanup can be performed.
	UprobeProgramControllerFinalizer = "bpfman.io.uprobeprogramcontroller/finalizer"
	// FentryProgramControllerFinalizer is the finalizer that holds a Fentry
	// BpfProgram object from deletion until cleanup can be performed.
	FentryProgramControllerFinalizer = "bpfman.io.fentryprogramcontroller/finalizer"
	// FexitProgramControllerFinalizer is the finalizer that holds a Fexit
	// BpfProgram object from deletion until cleanup can be performed.
	FexitProgramControllerFinalizer = "bpfman.io.fexitprogramcontroller/finalizer"
)
View Source
const UprobeString = "uprobe"

Define a constant string for Uprobe. It has the same kernel ProgramType as Kprobe, so we can't use the ProgramType String() method above.

Variables

This section is empty.

Functions

func BpfProgramNodePredicate

func BpfProgramNodePredicate(nodeName string) predicate.Funcs

Only reconcile if a bpfprogram has been created for a controller's node.

func BpfProgramTypePredicate

func BpfProgramTypePredicate(kind string) predicate.Funcs

Only reconcile if a bpfprogram has been created for the controller's program type.

func DiscoveredBpfProgramPredicate

func DiscoveredBpfProgramPredicate() predicate.Funcs

Only reconcile if a bpfprogram has been created for a controller's node.

func StatusChangedPredicate

func StatusChangedPredicate() predicate.Funcs

Types

type ProgramType

type ProgramType int32

Must match the kernel's `bpf_prog_type` enum. https://elixir.bootlin.com/linux/v6.4.4/source/include/uapi/linux/bpf.h#L948

const (
	Unspec ProgramType = iota
	SocketFilter
	Kprobe
	Tc
	SchedAct
	Tracepoint
	Xdp
	PerfEvent
	CgroupSkb
	CgroupSock
	LwtIn
	LwtOut
	LwtXmit
	SockOps
	SkSkb
	CgroupDevice
	SkMsg
	RawTracepoint
	CgroupSockAddr
	LwtSeg6Local
	LircMode2
	SkReuseport
	FlowDissector
	CgroupSysctl
	RawTracepointWritable
	CgroupSockopt
	Tracing
	StructOps
	Ext
	Lsm
	SkLookup
	Syscall
)

func FromString

func FromString(p string) (*ProgramType, error)

func (ProgramType) String

func (p ProgramType) String() string

func (ProgramType) Uint32

func (p ProgramType) Uint32() *uint32

type ReconcileResult

type ReconcileResult uint8
const (
	// No changes were made to k8s objects, and rescheduling another reconcile
	// is not necessary. The calling code may continue reconciling other
	// programs in it's list.
	Unchanged ReconcileResult = 0
	// Changes were made to k8s objects that we know will trigger another
	// reconcile.  Calling code should stop reconciling additional programs and
	// return immediately to avoid multiple concurrent reconcile threads.
	Updated ReconcileResult = 1
	// A retry should be scheduled. This should only be used when "Updated"
	// doesn't apply, but we want to trigger another reconcile anyway.  For
	// example, there was a transient error. The calling code may continue
	// reconciling other programs in it's list.
	Requeue ReconcileResult = 2
)

func (ReconcileResult) String

func (r ReconcileResult) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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