Class DeviceRequest
- java.lang.Object
-
- io.fabric8.kubernetes.api.model.resource.v1.DeviceRequest
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<DeviceRequestBuilder>,io.fabric8.kubernetes.api.model.KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class DeviceRequest extends Object implements io.fabric8.kubernetes.api.builder.Editable<DeviceRequestBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
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.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DeviceRequest()No args constructor for use in serializationDeviceRequest(ExactDeviceRequest exactly, List<DeviceSubRequest> firstAvailable, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeviceRequestBuilderedit()Map<String,Object>getAdditionalProperties()ExactDeviceRequestgetExactly()DeviceRequest is a request for devices required for a claim.List<DeviceSubRequest>getFirstAvailable()FirstAvailable contains subrequests, of which exactly one will be selected by the scheduler.StringgetName()Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetExactly(ExactDeviceRequest exactly)DeviceRequest is a request for devices required for a claim.voidsetFirstAvailable(List<DeviceSubRequest> firstAvailable)FirstAvailable contains subrequests, of which exactly one will be selected by the scheduler.voidsetName(String name)Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.DeviceRequestBuildertoBuilder()
-
-
-
Constructor Detail
-
DeviceRequest
public DeviceRequest()
No args constructor for use in serialization
-
DeviceRequest
public DeviceRequest(ExactDeviceRequest exactly, List<DeviceSubRequest> firstAvailable, String name)
-
-
Method Detail
-
getExactly
public ExactDeviceRequest getExactly()
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.
-
setExactly
public void setExactly(ExactDeviceRequest exactly)
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.
-
getFirstAvailable
public List<DeviceSubRequest> 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.
-
setFirstAvailable
public void setFirstAvailable(List<DeviceSubRequest> firstAvailable)
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.
-
getName
public String 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.
-
setName
public void setName(String name)
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.
-
edit
public DeviceRequestBuilder edit()
- Specified by:
editin interfaceio.fabric8.kubernetes.api.builder.Editable<DeviceRequestBuilder>
-
toBuilder
public DeviceRequestBuilder toBuilder()
-
-