Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetContainerID ¶
func SetContainerID(info *processapi.MsgK8sUnix)
Types ¶
type ContainerID ¶
type ContainerID = string
type Map ¶
type Map interface { // Get retrieves a container id based on a cgroup id Get(cgID CgroupID) (ContainerID, bool) // Add adds a <podID, contID, cgroupID> entry in the mapping Add(podID PodID, contID ContainerID, cgroupID CgroupID) // Update updates the state of pod and containers. // For example, previous container ids added for a certain pod will be removed if the // container ids are not in the provided list. Removing all information for a pod (e.g., // when a pod is deleted) can be done by passing an empty list of container ids. Update(podID PodID, contIDs []ContainerID) }
Map implements the a cgroup id to container id maping
Its intended use is to associate pod information with events by using a cgroup id defined in the low-level event (bpf or proc) to find the container ID.
The idea is:
- Get() is called by the pod-association code
- Add() is called to update the mapping. This can happen either in runtime hooks or by talking to the CRI
- Update() is called to update the state of container / pods. This is called by the K8s pod watcher.
Click to show internal directories.
Click to hide internal directories.