helpers

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientOrDie

func GetClientOrDie() *bpfmanclientset.Clientset

GetClientOrDie gets the bpfman Kubernetes Client dynamically switching between in cluster and out of cluster config setup.

func GetK8sConfigOrDie added in v0.6.0

func GetK8sConfigOrDie() *rest.Config

getk8sConfig gets a kubernetes config automatically detecting if it should be the in or out of cluster config. If this step fails panic.

func GetPriority added in v0.6.0

func GetPriority(priority *int32) int32

GetPriority reads a priority value. If priority is nil, return DefaultAttachPriority. Otherwise, return the value behind the pointer.

func IsBpfAppStateConditionFailure added in v0.6.0

func IsBpfAppStateConditionFailure(conditions []metav1.Condition) bool

func IsBpfAppStateConditionPending added in v0.6.0

func IsBpfAppStateConditionPending(conditions []metav1.Condition) bool

func IsBpfmanDeployed

func IsBpfmanDeployed() bool

IsBpfmanDeployed is used to check for the existence of bpfman in a Kubernetes cluster. Specifically it checks for the existence of the bpfman.io CRD api group within the apiserver. If getting the k8s config fails this will panic.

Types

type ProgramType

type ProgramType int32

Must match the internal bpfman-api mappings

const (
	Kprobe     ProgramType = 2
	Tc         ProgramType = 3
	Tracepoint ProgramType = 5
	Xdp        ProgramType = 6
	Tracing    ProgramType = 26
)

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 TcProgramDirection

type TcProgramDirection int32
const (
	Ingress TcProgramDirection = 1
	Egress  TcProgramDirection = 2
)

func (TcProgramDirection) String

func (t TcProgramDirection) String() string

Jump to

Keyboard shortcuts

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