Class V1beta2DeviceRequest
java.lang.Object
io.micronaut.kubernetes.client.openapi.model.V1beta2DeviceRequest
@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen")
public class V1beta2DeviceRequest
extends Object
DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices. With FirstAvailable it is also possible to provide a prioritized list of requests.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFirstAvailableItem
(V1beta2DeviceSubRequest firstAvailableItem) Add an item to the firstAvailable property in a chainable fashion.boolean
exactly
(V1beta2ExactDeviceRequest exactly) Set exactly in a chainable fashion.firstAvailable
(List<@Valid V1beta2DeviceSubRequest> firstAvailable) Set firstAvailable in a chainable fashion.List<@Valid V1beta2DeviceSubRequest>
FirstAvailable contains subrequests, of which exactly one will be selected by the scheduler.getName()
Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.int
hashCode()
Set name in a chainable fashion.void
setExactly
(V1beta2ExactDeviceRequest exactly) Set the exactly property valuevoid
setFirstAvailable
(List<@Valid V1beta2DeviceSubRequest> firstAvailable) Set the firstAvailable property valuevoid
Set the name property valuetoString()
-
Field Details
-
JSON_PROPERTY_NAME
- See Also:
-
JSON_PROPERTY_EXACTLY
- See Also:
-
JSON_PROPERTY_FIRST_AVAILABLE
- See Also:
-
-
Constructor Details
-
V1beta2DeviceRequest
-
-
Method Details
-
getName
Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim. References using the name in the DeviceRequest will uniquely identify a request when the Exactly field is set. When the FirstAvailable field is set, a reference to the name of the DeviceRequest will match whatever subrequest is chosen by the scheduler. Must be a DNS label.- Returns:
- the name property value
-
setName
Set the name property value- Parameters:
name
- property value to set
-
name
Set name in a chainable fashion.- Returns:
- The same instance of V1beta2DeviceRequest for chaining.
-
getExactly
- Returns:
- the exactly property value
-
setExactly
Set the exactly property value- Parameters:
exactly
- property value to set
-
exactly
Set exactly in a chainable fashion.- Returns:
- The same instance of V1beta2DeviceRequest for chaining.
-
getFirstAvailable
FirstAvailable contains subrequests, of which exactly one will be selected by the scheduler. It tries to satisfy them in the order in which they are listed here. So if there are two entries in the list, the scheduler will only check the second one if it determines that the first one can not be used. DRA does not yet implement scoring, so the scheduler will select the first set of devices that satisfies all the requests in the claim. And if the requirements can be satisfied on more than one node, other scheduling features will determine which node is chosen. This means that the set of devices allocated to a claim might not be the optimal set available to the cluster. Scoring will be implemented later.- Returns:
- the firstAvailable property value
-
setFirstAvailable
Set the firstAvailable property value- Parameters:
firstAvailable
- property value to set
-
firstAvailable
Set firstAvailable in a chainable fashion.- Returns:
- The same instance of V1beta2DeviceRequest for chaining.
-
addFirstAvailableItem
Add an item to the firstAvailable property in a chainable fashion.- Returns:
- The same instance of V1beta2DeviceRequest for chaining.
-
equals
-
hashCode
public int hashCode() -
toString
-