pub fn validate_server(
server: &ServerSpec,
mode: RepositoryMode,
) -> Vec<ValidationError>Expand description
The shared spec.server rules the type system can’t express (server addendum):
auth.insecurerequiresacknowledgeInsecure: true— a no-auth server exposes full read/read of the repository, so it must be explicit.service.portmust be non-zero.readOnly: falseis contradictory on amode: ReadOnlyrepository — a ReadOnly repo can never serve a writable UI, so the explicit denial is rejected (omitting the field is fine; the mode forces read-only).
mode is the parent repository’s RepositoryMode (both callers have it). Accumulates
so a user sees every server problem at once. The PVC ReadWriteMany requirement for
filesystem-backend servers is not here — it needs a live PVC read and is enforced
at reconcile, not admission.