Class ResourceClaimStatus
- java.lang.Object
-
- io.fabric8.kubernetes.api.model.resource.v1beta1.ResourceClaimStatus
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<ResourceClaimStatusBuilder>,io.fabric8.kubernetes.api.model.KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class ResourceClaimStatus extends Object implements io.fabric8.kubernetes.api.builder.Editable<ResourceClaimStatusBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ResourceClaimStatus()No args constructor for use in serializationResourceClaimStatus(AllocationResult allocation, List<AllocatedDeviceStatus> devices, List<ResourceClaimConsumerReference> reservedFor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceClaimStatusBuilderedit()Map<String,Object>getAdditionalProperties()AllocationResultgetAllocation()ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.List<AllocatedDeviceStatus>getDevices()Devices contains the status of each device allocated for this claim, as reported by the driver.List<ResourceClaimConsumerReference>getReservedFor()ReservedFor indicates which entities are currently allowed to use the claim.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetAllocation(AllocationResult allocation)ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.voidsetDevices(List<AllocatedDeviceStatus> devices)Devices contains the status of each device allocated for this claim, as reported by the driver.voidsetReservedFor(List<ResourceClaimConsumerReference> reservedFor)ReservedFor indicates which entities are currently allowed to use the claim.ResourceClaimStatusBuildertoBuilder()
-
-
-
Constructor Detail
-
ResourceClaimStatus
public ResourceClaimStatus()
No args constructor for use in serialization
-
ResourceClaimStatus
public ResourceClaimStatus(AllocationResult allocation, List<AllocatedDeviceStatus> devices, List<ResourceClaimConsumerReference> reservedFor)
-
-
Method Detail
-
getAllocation
public AllocationResult getAllocation()
ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.
-
setAllocation
public void setAllocation(AllocationResult allocation)
ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.
-
getDevices
public List<AllocatedDeviceStatus> getDevices()
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.
-
setDevices
public void setDevices(List<AllocatedDeviceStatus> devices)
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.
-
getReservedFor
public List<ResourceClaimConsumerReference> getReservedFor()
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 256 such reservations. This may get increased in the future, but not reduced.
-
setReservedFor
public void setReservedFor(List<ResourceClaimConsumerReference> reservedFor)
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 256 such reservations. This may get increased in the future, but not reduced.
-
edit
public ResourceClaimStatusBuilder edit()
- Specified by:
editin interfaceio.fabric8.kubernetes.api.builder.Editable<ResourceClaimStatusBuilder>
-
toBuilder
public ResourceClaimStatusBuilder toBuilder()
-
-