pub struct ResourceClaimStatus {
pub allocation: Option<AllocationResult>,
pub devices: Option<Vec<AllocatedDeviceStatus>>,
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.
devices: Option<Vec<AllocatedDeviceStatus>>
Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.
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
.