pub fn repository_ref_for(snap: &Snapshot) -> Option<RepositoryRef>Expand description
Derive the repository a Snapshot belongs to, in fixed precedence order:
status.resolved.repository— the run-time pin every produced snapshot records (controller-written, authoritative);spec.repository— the mint-time pin a multi-repo policy fan-out child or aSnapshotReplicationcopy CR carries (present before any status has been written, and the only pin such a CR is guaranteed to have);- the
Repository/ClusterRepositorycontrollerownerReferencea discovered snapshot carries (it has neither block).
Pure. Shared by the Restore reconciler (spec.repository derivation for
snapshotRef) and the kubectl kopiur browse data-plane, so the
derivation rule cannot fork.