pub fn validate_consumer_against_cluster_repo(
consumer_namespace: &str,
repo_name: &str,
allowed: &AllowedNamespaces,
labels: Option<&BTreeMap<String, String>>,
) -> ValidationResultExpand description
A consumer namespace is permitted by a ClusterRepository’s tenancy gate
(ADR §3.2/§4.3).
List→ membership test.All(true)→ always allowed;All(false)is meaningless and denies.Selector→ matched againstlabels(the consumer namespace’s labels). Thecrates/apicrate cannot fetch aNamespaceobject, so the caller (webhook) must supply the labels. IflabelsisNonewe fail closed withValidationError::SelectorLabelsUnavailablerather than guess — the webhook never trusts unfiltered input (ADR §3.2). Selector matching here is a simplematchLabelssuperset test (the common case);matchExpressionsis treated as “no constraint” for now and documented as such.