controller

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

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

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) Reconcile

func (h *JobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile handles Job completion/failure events

func (*JobReconciler) SetupWithManager

func (h *JobReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the job handler with the Manager.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL