Class V1beta1ResourceClaimStatus

java.lang.Object
io.kubernetes.client.openapi.models.V1beta1ResourceClaimStatus

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2025-02-12T21:15:49.397498Z[Etc/UTC]", comments="Generator version: 7.6.0") public class V1beta1ResourceClaimStatus extends Object
ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.
  • Field Details

  • Constructor Details

    • V1beta1ResourceClaimStatus

      public V1beta1ResourceClaimStatus()
  • Method Details

    • allocation

      public V1beta1ResourceClaimStatus allocation(V1beta1AllocationResult allocation)
    • getAllocation

      @Nullable public V1beta1AllocationResult getAllocation()
      Get allocation
      Returns:
      allocation
    • setAllocation

      public void setAllocation(V1beta1AllocationResult allocation)
    • devices

    • addDevicesItem

      public V1beta1ResourceClaimStatus addDevicesItem(V1beta1AllocatedDeviceStatus devicesItem)
    • getDevices

      @Nullable public List<V1beta1AllocatedDeviceStatus> 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.
      Returns:
      devices
    • setDevices

      public void setDevices(List<V1beta1AllocatedDeviceStatus> devices)
    • reservedFor

    • addReservedForItem

      public V1beta1ResourceClaimStatus addReservedForItem(V1beta1ResourceClaimConsumerReference reservedForItem)
    • getReservedFor

      @Nullable public List<V1beta1ResourceClaimConsumerReference> 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.
      Returns:
      reservedFor
    • setReservedFor

      public void setReservedFor(List<V1beta1ResourceClaimConsumerReference> reservedFor)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      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 V1beta1ResourceClaimStatus
    • fromJson

      public static V1beta1ResourceClaimStatus fromJson(String jsonString) throws IOException
      Create an instance of V1beta1ResourceClaimStatus given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of V1beta1ResourceClaimStatus
      Throws:
      IOException - if the JSON string is invalid with respect to V1beta1ResourceClaimStatus
    • toJson

      public String toJson()
      Convert an instance of V1beta1ResourceClaimStatus to an JSON string
      Returns:
      JSON string