Class V1alpha3ResourceClaimStatus
java.lang.Object
io.kubernetes.client.openapi.models.V1alpha3ResourceClaimStatus
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-10-04T19:37:38.574271Z[Etc/UTC]",
comments="Generator version: 7.6.0")
public class V1alpha3ResourceClaimStatus
extends Object
ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddReservedForItem
(V1alpha3ResourceClaimConsumerReference reservedForItem) allocation
(V1alpha3AllocationResult allocation) deallocationRequested
(Boolean deallocationRequested) boolean
static V1alpha3ResourceClaimStatus
Create an instance of V1alpha3ResourceClaimStatus given an JSON stringGet allocationIndicates that a claim is to be deallocated.ReservedFor indicates which entities are currently allowed to use the claim.int
hashCode()
reservedFor
(List<V1alpha3ResourceClaimConsumerReference> reservedFor) void
setAllocation
(V1alpha3AllocationResult allocation) void
setDeallocationRequested
(Boolean deallocationRequested) void
setReservedFor
(List<V1alpha3ResourceClaimConsumerReference> reservedFor) toJson()
Convert an instance of V1alpha3ResourceClaimStatus to an JSON stringtoString()
static void
validateJsonElement
(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_ALLOCATION
- See Also:
-
SERIALIZED_NAME_DEALLOCATION_REQUESTED
- See Also:
-
SERIALIZED_NAME_RESERVED_FOR
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1alpha3ResourceClaimStatus
public V1alpha3ResourceClaimStatus()
-
-
Method Details
-
allocation
-
getAllocation
Get allocation- Returns:
- allocation
-
setAllocation
-
deallocationRequested
-
getDeallocationRequested
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.- Returns:
- deallocationRequested
-
setDeallocationRequested
-
reservedFor
public V1alpha3ResourceClaimStatus reservedFor(List<V1alpha3ResourceClaimConsumerReference> reservedFor) -
addReservedForItem
public V1alpha3ResourceClaimStatus addReservedForItem(V1alpha3ResourceClaimConsumerReference reservedForItem) -
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 32 such reservations. This may get increased in the future, but not reduced.- Returns:
- reservedFor
-
setReservedFor
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement
- JSON Element- Throws:
IOException
- if the JSON Element is invalid with respect to V1alpha3ResourceClaimStatus
-
fromJson
Create an instance of V1alpha3ResourceClaimStatus given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of V1alpha3ResourceClaimStatus
- Throws:
IOException
- if the JSON string is invalid with respect to V1alpha3ResourceClaimStatus
-
toJson
Convert an instance of V1alpha3ResourceClaimStatus to an JSON string- Returns:
- JSON string
-