Skip to main content

schedule_cr_growth_warning

Function schedule_cr_growth_warning 

Source
pub fn schedule_cr_growth_warning(cron: &str) -> Option<String>
Expand description

A non-blocking admission WARNING (never a rejection) when a schedule’s cron fires more often than hourly (issue #249). Every fire creates one per-run Snapshot CR per source, and they accumulate up to the SnapshotPolicy retention window — each terminal one is then re-reconciled for that whole window — so a sub-hourly cadence with a wide (or absent) retention can produce thousands of CRs. Sub-hourly is legitimate for some workloads, so this is a footgun heads-up, not a block.

Pure and cron-only: the schedule webhook is client-less and can’t read the referenced policy’s retention, so the message states the cadence and the CR-count relationship rather than an exact number. None for an hourly-or-slower cadence, or a cron that doesn’t parse (that error is surfaced by validate_cron).