Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchExpression ¶
func MatchExpression(labelSet map[string]string, expr metav1.LabelSelectorRequirement) bool
MatchExpression evaluates a single label selector expression against a label set.
func MatchesSelector ¶
func MatchesSelector(cj *batchv1.CronJob, selector *guardianv1alpha1.CronJobSelector) bool
MatchesSelector checks if a CronJob matches a monitor's selector. This is a shared utility used by both CronJobMonitorReconciler and JobHandler to ensure consistent selector evaluation.
Types ¶
type AlertChannelReconciler ¶
type AlertChannelReconciler struct {
client.Client
Log logr.Logger // Required - must be injected
Scheme *runtime.Scheme
AlertDispatcher alerting.Dispatcher
}
AlertChannelReconciler reconciles an AlertChannel object
func (*AlertChannelReconciler) Reconcile ¶
func (r *AlertChannelReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile handles AlertChannel reconciliation
func (*AlertChannelReconciler) SetupWithManager ¶
func (r *AlertChannelReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type CronJobMonitorReconciler ¶
type CronJobMonitorReconciler struct {
client.Client
Log logr.Logger // Required - must be injected
Scheme *runtime.Scheme
Store store.Store
Config *config.Config
Analyzer analyzer.SLAAnalyzer
AlertDispatcher alerting.Dispatcher
}
CronJobMonitorReconciler reconciles a CronJobMonitor object
func (*CronJobMonitorReconciler) Reconcile ¶
func (r *CronJobMonitorReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop
func (*CronJobMonitorReconciler) SetupWithManager ¶
func (r *CronJobMonitorReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type JobReconciler ¶
type JobReconciler struct {
client.Client
Log logr.Logger // Required - must be injected
Scheme *runtime.Scheme
Clientset *kubernetes.Clientset
Store store.Store
Config *config.Config
AlertDispatcher alerting.Dispatcher
}
JobReconciler reconciles Job events for execution tracking
func (*JobReconciler) SetupWithManager ¶
func (h *JobReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the job handler with the Manager.