pub fn validate_repository_parameters(
parameters: Option<&RepositoryParameters>,
mode: RepositoryMode,
context: &str,
) -> Vec<ValidationError>Expand description
spec.parameters is well-formed and applicable (#258). Shared by both repository
kinds via context, exactly like validate_repository_health.
Two classes of rule:
- Grammar. Every duration must parse, and every count must be positive. The grammar check matters more here than elsewhere: these are the first CRD durations that reach a kopia CLI, and this module’s contract is that a value the webhook admits never fails at reconcile time.
- Applicability. A
mode: ReadOnlyrepository can never apply them — kopia hard-errorsset-parameterson a read-only connection — so declaring them there is a configuration mistake. Reject it rather than silently ignore the block, matching howvolumeSnapshotClassName+ an NFS source is handled.