Skip to main content

validate_jitter

Function validate_jitter 

Source
pub fn validate_jitter(field: &str, jitter: Option<&str>) -> ValidationResult
Expand description

Validate an optional Go-style jitter duration (30m, 1h, …) against the SAME parser the controller uses at scheduling time, so a typo or an out-of-range value is rejected at apply time rather than silently degrading to no jitter at the next reconcile (parse_go_duration returns None, which the schedule treats as a zero offset). None (no jitter) is always valid. field names the path for the error message (e.g. spec.schedule.jitter).