resolve_placement

Function resolve_placement 

Source
pub fn resolve_placement<'a>(
    instance: &'a Bind9Instance,
    cluster: Option<&'a Bind9Cluster>,
    cluster_provider: Option<&'a ClusterBind9Provider>,
) -> Option<&'a PlacementConfig>
Expand description

Resolves which placement block applies to an instance.

Precedence, highest first:

  1. Bind9Instance.spec.placement
  2. spec.primary.placement / spec.secondary.placement on the owning Bind9Cluster or ClusterBind9Provider

Resolution is whole-block: the more specific level wins outright and the other is not merged into it. Merging would make “what will actually be scheduled” unanswerable without mentally combining two blocks, and a silently half-inherited scheduling rule is a bad failure mode — a Pod that lands somewhere unexpected is hard to notice until a zone goes down.