Documentation
¶
Index ¶
Constants ¶
const ( ScheduleHourlyRandom = "@hourly-random" ScheduleDailyRandom = "@daily-random" ScheduleYearlyRandom = "@yearly-random" ScheduleAnnuallyRandom = "@annually-random" ScheduleMonthlyRandom = "@monthly-random" ScheduleWeeklyRandom = "@weekly-random" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
Handler is the generic job handler for most of the k8up jobs.
func NewHandler ¶
NewHandler will return a new generic handler.
type JobHandler ¶
JobHandler handles the reconciles for the batchv1.job objects that are observed by the operator.
func NewJobHandler ¶
func NewJobHandler(config job.Config, job *batchv1.Job) *JobHandler
NewJobHandler returns a new JobHandler.
func (*JobHandler) Handle ¶
func (j *JobHandler) Handle() error
Handle extracts some information from the batchv1.job that make observations easier.
type ScheduleHandler ¶
ScheduleHandler handles the reconciles for the schedules. Schedules are a special type of k8up objects as they will only trigger jobs indirectly.
func NewScheduleHandler ¶
func NewScheduleHandler( config job.Config, schedule *k8upv1alpha1.Schedule, effectiveSchedules map[k8upv1alpha1.JobType]k8upv1alpha1.EffectiveSchedule) *ScheduleHandler
NewScheduleHandler will return a new ScheduleHandler.
func (*ScheduleHandler) DeleteResource ¶
func (s *ScheduleHandler) DeleteResource(obj client.Object) error
DeleteResource will delete the given resource. Errors will be logged, and the Ready condition set to False.
func (*ScheduleHandler) Handle ¶
func (s *ScheduleHandler) Handle() error
Handle handles the schedule management. It's responsible for adding and removing the jobs from the internal cron library.
func (*ScheduleHandler) UpsertResource ¶
func (s *ScheduleHandler) UpsertResource(obj client.Object) error
UpsertResource updates the given object if it exists. If it fails with not existing error, it will be created. If both operation failed, the error is logged and Ready condition will be set to False.