Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PolicyReconciler ¶
type PolicyReconciler struct { client.Client Scheme *runtime.Scheme TraceeNamespace string TraceeName string }
PolicyReconciler is the main controller for the Tracee Policy CRD. It is responsible for updating the Tracee DaemonSet whenever a change is detected in a TraceePolicy object.
func (*PolicyReconciler) Reconcile ¶
Reconcile is where the reconciliation logic resides. Every time a change is detected in a v1beta1.Policy object, this function will be called. It will update the Tracee DaemonSet, so that the Tracee pods will be restarted with the new policy. It does this by adding a timestamp annotation to the pod template, so that the daemonset controller will rollout a new daemonset ("restarting" the daemonset).
func (*PolicyReconciler) SetupWithManager ¶
func (r *PolicyReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager is responsible for connecting the PolicyReconciler to the main controller manager. It tells the manager that for changes in v1beta1Policy objects, the PolicyReconciler should be invoked.