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 TrackerNamespace string TrackerName string }
PolicyReconciler is the main controller for the Tracker Policy CRD. It is responsible for updating the Tracker DaemonSet whenever a change is detected in a TrackerPolicy 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 Tracker DaemonSet, so that the Tracker 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.