Struct k8s_openapi::api::resource::v1alpha2::ResourceClass
source · pub struct ResourceClass {
pub driver_name: String,
pub metadata: ObjectMeta,
pub parameters_ref: Option<ResourceClassParametersReference>,
pub suitable_nodes: Option<NodeSelector>,
}
Expand description
ResourceClass is used by administrators to influence how resources are allocated.
This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
Fields§
§driver_name: String
DriverName defines the name of the dynamic resource driver that is used for allocation of a ResourceClaim that uses this class.
Resource drivers have a unique name in forward domain order (acme.example.com).
metadata: ObjectMeta
Standard object metadata
parameters_ref: Option<ResourceClassParametersReference>
ParametersRef references an arbitrary separate object that may hold parameters that will be used by the driver when allocating a resource that uses this class. A dynamic resource driver can distinguish between parameters stored here and and those stored in ResourceClaimSpec.
suitable_nodes: Option<NodeSelector>
Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a ResourceClaim that has not been allocated yet.
Setting this field is optional. If null, all nodes are candidates.
Trait Implementations§
source§impl Clone for ResourceClass
impl Clone for ResourceClass
source§fn clone(&self) -> ResourceClass
fn clone(&self) -> ResourceClass
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ResourceClass
impl Debug for ResourceClass
source§impl DeepMerge for ResourceClass
impl DeepMerge for ResourceClass
source§fn merge_from(&mut self, other: Self)
fn merge_from(&mut self, other: Self)
other
into self
.source§impl Default for ResourceClass
impl Default for ResourceClass
source§fn default() -> ResourceClass
fn default() -> ResourceClass
source§impl<'de> Deserialize<'de> for ResourceClass
impl<'de> Deserialize<'de> for ResourceClass
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
source§impl ListableResource for ResourceClass
impl ListableResource for ResourceClass
source§impl Metadata for ResourceClass
impl Metadata for ResourceClass
source§impl PartialEq for ResourceClass
impl PartialEq for ResourceClass
source§fn eq(&self, other: &ResourceClass) -> bool
fn eq(&self, other: &ResourceClass) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Resource for ResourceClass
impl Resource for ResourceClass
source§const API_VERSION: &'static str = "resource.k8s.io/v1alpha2"
const API_VERSION: &'static str = "resource.k8s.io/v1alpha2"
Resource::GROUP
and Resource::VERSION
(eg "apiextensions.k8s.io/v1beta1"
)
or just the version for resources without a group (eg "v1"
). Read more