[−][src]Struct k8s_csi::v1_3_0::TopologyRequirement
Fields
requisite: Vec<Topology>
Specifies the list of topologies the provisioned volume MUST be accessible from. This field is OPTIONAL. If TopologyRequirement is specified either requisite or preferred or both MUST be specified.
If requisite is specified, the provisioned volume MUST be accessible from at least one of the requisite topologies.
Given x = number of topologies provisioned volume is accessible from n = number of requisite topologies The CO MUST ensure n >= 1. The SP MUST ensure x >= 1 If x==n, then the SP MUST make the provisioned volume available to all topologies from the list of requisite topologies. If it is unable to do so, the SP MUST fail the CreateVolume call. For example, if a volume should be accessible from a single zone, and requisite = {"region": "R1", "zone": "Z2"} then the provisioned volume MUST be accessible from the "region" "R1" and the "zone" "Z2". Similarly, if a volume should be accessible from two zones, and requisite = {"region": "R1", "zone": "Z2"}, {"region": "R1", "zone": "Z3"} then the provisioned volume MUST be accessible from the "region" "R1" and both "zone" "Z2" and "zone" "Z3".
If x<n, then the SP SHALL choose x unique topologies from the list of requisite topologies. If it is unable to do so, the SP MUST fail the CreateVolume call. For example, if a volume should be accessible from a single zone, and requisite = {"region": "R1", "zone": "Z2"}, {"region": "R1", "zone": "Z3"} then the SP may choose to make the provisioned volume available in either the "zone" "Z2" or the "zone" "Z3" in the "region" "R1". Similarly, if a volume should be accessible from two zones, and requisite = {"region": "R1", "zone": "Z2"}, {"region": "R1", "zone": "Z3"}, {"region": "R1", "zone": "Z4"} then the provisioned volume MUST be accessible from any combination of two unique topologies: e.g. "R1/Z2" and "R1/Z3", or "R1/Z2" and "R1/Z4", or "R1/Z3" and "R1/Z4".
If x>n, then the SP MUST make the provisioned volume available from all topologies from the list of requisite topologies and MAY choose the remaining x-n unique topologies from the list of all possible topologies. If it is unable to do so, the SP MUST fail the CreateVolume call. For example, if a volume should be accessible from two zones, and requisite = {"region": "R1", "zone": "Z2"} then the provisioned volume MUST be accessible from the "region" "R1" and the "zone" "Z2" and the SP may select the second zone independently, e.g. "R1/Z4".
preferred: Vec<Topology>
Specifies the list of topologies the CO would prefer the volume to be provisioned in.
This field is OPTIONAL. If TopologyRequirement is specified either requisite or preferred or both MUST be specified.
An SP MUST attempt to make the provisioned volume available using the preferred topologies in order from first to last.
If requisite is specified, all topologies in preferred list MUST also be present in the list of requisite topologies.
If the SP is unable to to make the provisioned volume available from any of the preferred topologies, the SP MAY choose a topology from the list of requisite topologies. If the list of requisite topologies is not specified, then the SP MAY choose from the list of all possible topologies. If the list of requisite topologies is specified and the SP is unable to to make the provisioned volume available from any of the requisite topologies it MUST fail the CreateVolume call.
Example 1: Given a volume should be accessible from a single zone, and requisite = {"region": "R1", "zone": "Z2"}, {"region": "R1", "zone": "Z3"} preferred = {"region": "R1", "zone": "Z3"} then the the SP SHOULD first attempt to make the provisioned volume available from "zone" "Z3" in the "region" "R1" and fall back to "zone" "Z2" in the "region" "R1" if that is not possible.
Example 2: Given a volume should be accessible from a single zone, and requisite = {"region": "R1", "zone": "Z2"}, {"region": "R1", "zone": "Z3"}, {"region": "R1", "zone": "Z4"}, {"region": "R1", "zone": "Z5"} preferred = {"region": "R1", "zone": "Z4"}, {"region": "R1", "zone": "Z2"} then the the SP SHOULD first attempt to make the provisioned volume accessible from "zone" "Z4" in the "region" "R1" and fall back to "zone" "Z2" in the "region" "R1" if that is not possible. If that is not possible, the SP may choose between either the "zone" "Z3" or "Z5" in the "region" "R1".
Example 3: Given a volume should be accessible from TWO zones (because an opaque parameter in CreateVolumeRequest, for example, specifies the volume is accessible from two zones, aka synchronously replicated), and requisite = {"region": "R1", "zone": "Z2"}, {"region": "R1", "zone": "Z3"}, {"region": "R1", "zone": "Z4"}, {"region": "R1", "zone": "Z5"} preferred = {"region": "R1", "zone": "Z5"}, {"region": "R1", "zone": "Z3"} then the the SP SHOULD first attempt to make the provisioned volume accessible from the combination of the two "zones" "Z5" and "Z3" in the "region" "R1". If that's not possible, it should fall back to a combination of "Z5" and other possibilities from the list of requisite. If that's not possible, it should fall back to a combination of "Z3" and other possibilities from the list of requisite. If that's not possible, it should fall back to a combination of other possibilities from the list of requisite.
Trait Implementations
impl Clone for TopologyRequirement
[src]
fn clone(&self) -> TopologyRequirement
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for TopologyRequirement
[src]
impl Default for TopologyRequirement
[src]
fn default() -> TopologyRequirement
[src]
impl Message for TopologyRequirement
[src]
fn encode_raw<B>(&self, buf: &mut B) where
B: BufMut,
[src]
B: BufMut,
fn merge_field<B>(
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
[src]
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
fn encoded_len(&self) -> usize
[src]
fn clear(&mut self)
[src]
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
[src]
B: BufMut,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
[src]
B: BufMut,
fn decode<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
[src]
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
[src]
B: Buf,
Self: Default,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
[src]
B: Buf,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
[src]
B: Buf,
impl PartialEq<TopologyRequirement> for TopologyRequirement
[src]
fn eq(&self, other: &TopologyRequirement) -> bool
[src]
fn ne(&self, other: &TopologyRequirement) -> bool
[src]
impl StructuralPartialEq for TopologyRequirement
[src]
Auto Trait Implementations
impl RefUnwindSafe for TopologyRequirement
impl Send for TopologyRequirement
impl Sync for TopologyRequirement
impl Unpin for TopologyRequirement
impl UnwindSafe for TopologyRequirement
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoRequest<T> for T
[src]
fn into_request(self) -> Request<T>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,