Documentation
¶
Overview ¶
Package controller provides the Kubernetes controller for watching pods and managing eBPF program attachments.
Index ¶
Constants ¶
View Source
const ( // AnnotationEnabled is the annotation that enables Kloak for a pod. AnnotationEnabled = "getkloak.io/enabled" // CgroupBasePath is the base path for cgroups v2. CgroupBasePath = "/sys/fs/cgroup" )
View Source
const ( // AnnotationSecretEnabled is the label/annotation to enable Kloak secret replication. AnnotationSecretEnabled = "getkloak.io/enabled" // AnnotationPort is the label/annotation to specify an allowed port for a secret. AnnotationPort = "getkloak.io/port" // AnnotationHosts is the label/annotation to specify allowed hosts for a secret. AnnotationHosts = "getkloak.io/hosts" // ShadowSecretSuffix is the suffix appended to the name of the shadow secret. ShadowSecretSuffix = "-kloak" // ValuePrefix is the prefix for generated UUID values. // Must match what the eBPF program expects. ValuePrefix = "kloak:" // ShadowPrefixLen is the length of the prefix used for BPF map key collision detection. // The BPF program uses the first 8 bytes as the lookup key. ShadowPrefixLen = 8 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reconciler ¶
type Reconciler struct {
client.Client
Log *zap.SugaredLogger
Scheme *runtime.Scheme
UprobeManager *ebpf.TLSUprobeManager
CgroupRoot string
// NodeName filters pods to only those on this node (empty = all nodes)
NodeName string
// contains filtered or unexported fields
}
Reconciler watches pods and manages eBPF cgroup tracking.
func NewReconciler ¶
func NewReconciler(c client.Client, log *zap.SugaredLogger, scheme *runtime.Scheme, uprobeMgr *ebpf.TLSUprobeManager, cgroupRoot, nodeName string) *Reconciler
NewReconciler creates a new pod reconciler.
func (*Reconciler) GetTrackedPodCount ¶
func (r *Reconciler) GetTrackedPodCount() int
GetTrackedPodCount returns the number of currently tracked pods.
func (*Reconciler) SetupWithManager ¶
func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type SecretReconciler ¶
SecretReconciler reconciles a Secret object
func (*SecretReconciler) SetupWithManager ¶
func (r *SecretReconciler) SetupWithManager(mgr ctrl.Manager) error
Click to show internal directories.
Click to hide internal directories.