Documentation
¶
Index ¶
- Constants
- Variables
- func HiveDataContainerCmp(hiveData hivev1alpha1.HiveData, pod corev1.Pod, ...) bool
- func HiveDataTrapCmp(hiveData hivev1alpha1.HiveData, hiveTrap hivev1alpha1.HiveTrap) (bool, error)
- func HiveTrapHashID(hiveTrap hivev1alpha1.HiveTrap) (string, error)
- func NewHiveDataName(inode uint64, containerStatus corev1.ContainerStatus) string
- func Output(client client.Reader)
- func RegexMatch(regex string, containerName string) (bool, error)
- type HiveDataReconciler
- type HivePodReconciler
- type HivePolicyReconciler
Constants ¶
View Source
const ( KernelIDPath = "/proc/sys/kernel/random/boot_id" TrapIdLabel = "trap-id" )
Variables ¶
View Source
var (
KernelID string = ""
)
Functions ¶
func HiveDataContainerCmp ¶
func HiveDataContainerCmp(hiveData hivev1alpha1.HiveData, pod corev1.Pod, containerStatus corev1.ContainerStatus) bool
func HiveDataTrapCmp ¶
func HiveDataTrapCmp(hiveData hivev1alpha1.HiveData, hiveTrap hivev1alpha1.HiveTrap) (bool, error)
func HiveTrapHashID ¶
func HiveTrapHashID(hiveTrap hivev1alpha1.HiveTrap) (string, error)
func NewHiveDataName ¶
func NewHiveDataName(inode uint64, containerStatus corev1.ContainerStatus) string
Types ¶
type HiveDataReconciler ¶
type HiveDataReconciler struct { client.Client UncachedClient client.Reader Scheme *runtime.Scheme }
func (*HiveDataReconciler) SetupWithManager ¶
func (r *HiveDataReconciler) SetupWithManager(mgr ctrl.Manager) error
type HivePodReconciler ¶
func (*HivePodReconciler) Reconcile ¶
func (r *HivePodReconciler) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error)
There are two main operations we are concearned about with pods: pod creation and pod termination.
- creation: upon creation, the controller should send a reconcile request for HivePolicy so that new HiveData will be generated for the new pod.
- termination: upon termination, the controller should check if each HiveData refers to an existing pod. If it doesn't, then that resource should be eliminated.
Failures are treated as terminations.
func (*HivePodReconciler) SetupWithManager ¶
func (r *HivePodReconciler) SetupWithManager(mgr ctrl.Manager) error
type HivePolicyReconciler ¶
type HivePolicyReconciler struct { client.Client UncachedClient client.Reader Scheme *runtime.Scheme }
func (*HivePolicyReconciler) Reconcile ¶
func (r *HivePolicyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
The HivePolicy reconciliation is responsible for the following:
- For each HivePolicy, fetch files' information such as the inode number from the matched container.
- create HiveData resources with the previously fetched information if not already present.
func (*HivePolicyReconciler) SetupWithManager ¶
func (r *HivePolicyReconciler) SetupWithManager(mgr ctrl.Manager) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.