Skip to main content

validate_repository_maintenance

Function validate_repository_maintenance 

Source
pub fn validate_repository_maintenance(
    maintenance: &RepositoryMaintenanceSpec,
    cluster_scoped: bool,
) -> Vec<ValidationError>
Expand description

Validate a spec.maintenance block on a Repository/ClusterRepository, accumulating problems (ADR §3.7):

  • any override schedule’s quick/full crons must parse (same parser as runtime);
  • namespace is cluster-scope only — it selects where the namespaced managed Maintenance lands for a ClusterRepository, and is forbidden on a namespaced Repository (whose Maintenance always lives in its own ns).

cluster_scoped is the only thing that differs between the two repository kinds, so one validator serves both call sites.