Class V1beta2ResourceSlice
ResourceSlice represents one or more resources in a pool of similar resources,
managed by a common driver. A pool may span more than one ResourceSlice, and
exactly how many ResourceSlices comprise a pool is determined by the driver.
At the moment, the only supported resources are devices with attributes and
capacities. Each device in a given pool, regardless of how many ResourceSlices,
must have a unique name. The ResourceSlice in which a device gets published may
change over time. The unique identifier for a device is the tuple <driver name>,
<pool name>, <device name>.
Whenever a driver needs to update a pool, it increments the
pool.Spec.Pool.Generation number and updates all ResourceSlices with that new
number and new resource definitions. A consumer must only use ResourceSlices
with the highest generation number and ignore all others.
When allocating all resources in a pool matching certain criteria or when
looking for the best solution among several different alternatives, a consumer
should check the number of ResourceSlices in a pool (included in each
ResourceSlice) to determine whether its view of a pool is complete and if not,
should wait until the driver has completed updating the pool.
For resources that are not local to a node, the node name is not set. Instead,
the driver may use a node selector to specify where the devices are available.
This is an alpha type and requires enabling the DynamicResourceAllocation
feature gate.
Inheritance
V1beta2ResourceSlice
Assembly: KubernetesClient.dll
Syntax
[KubernetesEntity(Group = "resource.k8s.io", Kind = "ResourceSlice", ApiVersion = "v1beta2", PluralName = "resourceslices")]
public record V1beta2ResourceSlice : IKubernetesObject<V1ObjectMeta>, IKubernetesObject, IMetadata<V1ObjectMeta>, ISpec<V1beta2ResourceSliceSpec>, IEquatable<V1beta2ResourceSlice>
Constructors
View Source
V1beta2ResourceSlice()
Declaration
public V1beta2ResourceSlice()
View Source
V1beta2ResourceSlice(V1beta2ResourceSlice)
Declaration
protected V1beta2ResourceSlice(V1beta2ResourceSlice original)
Parameters
Fields
View Source
KubeApiVersion
Declaration
public const string KubeApiVersion = "v1beta2"
Field Value
View Source
KubeGroup
Declaration
public const string KubeGroup = "resource.k8s.io"
Field Value
View Source
KubeKind
Declaration
public const string KubeKind = "ResourceSlice"
Field Value
View Source
KubePluralName
Declaration
public const string KubePluralName = "resourceslices"
Field Value
Properties
View Source
ApiVersion
Declaration
[JsonPropertyName("apiVersion")]
public string ApiVersion { get; set; }
Property Value
View Source
EqualityContract
Declaration
protected virtual Type EqualityContract { get; }
Property Value
View Source
Kind
Declaration
[JsonPropertyName("kind")]
public string Kind { get; set; }
Property Value
View Source
Declaration
[JsonPropertyName("metadata")]
public V1ObjectMeta Metadata { get; set; }
Property Value
View Source
Spec
Contains the information published by the driver.
Changing the spec automatically increments the metadata.generation number.
Declaration
[JsonPropertyName("spec")]
public V1beta2ResourceSliceSpec Spec { get; set; }
Property Value
Methods
View Source
Equals(object?)
Declaration
public override bool Equals(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
View Source
Equals(V1beta2ResourceSlice?)
Declaration
public virtual bool Equals(V1beta2ResourceSlice? other)
Parameters
Returns
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
View Source
PrintMembers(StringBuilder)
Declaration
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
Returns
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
View Source
operator ==(V1beta2ResourceSlice?, V1beta2ResourceSlice?)
Declaration
public static bool operator ==(V1beta2ResourceSlice? left, V1beta2ResourceSlice? right)
Parameters
Returns
View Source
operator !=(V1beta2ResourceSlice?, V1beta2ResourceSlice?)
Declaration
public static bool operator !=(V1beta2ResourceSlice? left, V1beta2ResourceSlice? right)
Parameters
Returns
Implements
Extension Methods