Struct k8s_openapi::api::resource::v1alpha3::ResourceClaimStatus
source · pub struct ResourceClaimStatus {
pub allocation: Option<AllocationResult>,
pub deallocation_requested: Option<bool>,
pub reserved_for: Option<Vec<ResourceClaimConsumerReference>>,
}
Expand description
ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.
Fields§
§allocation: Option<AllocationResult>
Allocation is set once the claim has been allocated successfully.
deallocation_requested: Option<bool>
Indicates that a claim is to be deallocated. While this is set, no new consumers may be added to ReservedFor.
This is only used if the claim needs to be deallocated by a DRA driver. That driver then must deallocate this claim and reset the field together with clearing the Allocation field.
This is an alpha field and requires enabling the DRAControlPlaneController feature gate.
reserved_for: Option<Vec<ResourceClaimConsumerReference>>
ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.
In a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.
Both schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.
There can be at most 32 such reservations. This may get increased in the future, but not reduced.
Trait Implementations§
source§impl Clone for ResourceClaimStatus
impl Clone for ResourceClaimStatus
source§fn clone(&self) -> ResourceClaimStatus
fn clone(&self) -> ResourceClaimStatus
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ResourceClaimStatus
impl Debug for ResourceClaimStatus
source§impl DeepMerge for ResourceClaimStatus
impl DeepMerge for ResourceClaimStatus
source§fn merge_from(&mut self, other: Self)
fn merge_from(&mut self, other: Self)
other
into self
.source§impl Default for ResourceClaimStatus
impl Default for ResourceClaimStatus
source§fn default() -> ResourceClaimStatus
fn default() -> ResourceClaimStatus
source§impl<'de> Deserialize<'de> for ResourceClaimStatus
impl<'de> Deserialize<'de> for ResourceClaimStatus
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
source§impl PartialEq for ResourceClaimStatus
impl PartialEq for ResourceClaimStatus
source§impl Serialize for ResourceClaimStatus
impl Serialize for ResourceClaimStatus
impl StructuralPartialEq for ResourceClaimStatus
Auto Trait Implementations§
impl Freeze for ResourceClaimStatus
impl RefUnwindSafe for ResourceClaimStatus
impl Send for ResourceClaimStatus
impl Sync for ResourceClaimStatus
impl Unpin for ResourceClaimStatus
impl UnwindSafe for ResourceClaimStatus
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)