pub struct PlacementContext<'a> {
pub instance_name: &'a str,
pub cluster_name: Option<&'a str>,
pub role: ServerRole,
pub instance_replicas: i32,
pub role_instance_count: i32,
pub cluster_instance_count: i32,
pub instance_selector_labels: &'a BTreeMap<String, String>,
}Expand description
Everything build_pod_placement needs to know about the instance whose
Pod spec is being built.
Fields§
§instance_name: &'a strName of the Bind9Instance (also the Deployment name).
cluster_name: Option<&'a str>Owning cluster / provider name, or None for a standalone instance.
Role and Cluster spread scopes are only meaningful with a cluster:
they select on bindy.firestoned.io/cluster, which a standalone
instance’s Pods do not carry.
role: ServerRoleRole of this instance.
instance_replicas: i32Pods in this instance’s own Deployment (spec.replicas).
role_instance_count: i32How many instances of this role the owning cluster asks for.
1 for a standalone instance. This is what makes the default fire for
a cluster of three single-Pod primaries, where instance_replicas on
its own would always be 1 and never reach the threshold.
cluster_instance_count: i32Total instances the cluster asks for across both roles.
Only used to decide whether a Cluster-scoped default is worth
emitting.
instance_selector_labels: &'a BTreeMap<String, String>This Deployment’s own Pod selector labels, used for Instance scope.
Trait Implementations§
Source§impl<'a> Clone for PlacementContext<'a>
impl<'a> Clone for PlacementContext<'a>
Source§fn clone(&self) -> PlacementContext<'a>
fn clone(&self) -> PlacementContext<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for PlacementContext<'a>
impl<'a> RefUnwindSafe for PlacementContext<'a>
impl<'a> Send for PlacementContext<'a>
impl<'a> Sync for PlacementContext<'a>
impl<'a> Unpin for PlacementContext<'a>
impl<'a> UnwindSafe for PlacementContext<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].