Show / Hide Table of Contents

Class V1beta1CapacityRequirements

CapacityRequirements defines the capacity requirements for a specific device request.

Inheritance
object
V1beta1CapacityRequirements
Implements
IEquatable<V1beta1CapacityRequirements>
Inherited Members
object.GetType()
object.MemberwiseClone()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: k8s.Models
Assembly: KubernetesClient.dll
Syntax
public record V1beta1CapacityRequirements : IEquatable<V1beta1CapacityRequirements>

Constructors

View Source

V1beta1CapacityRequirements()

Declaration
public V1beta1CapacityRequirements()
View Source

V1beta1CapacityRequirements(V1beta1CapacityRequirements)

Declaration
protected V1beta1CapacityRequirements(V1beta1CapacityRequirements original)
Parameters
Type Name Description
V1beta1CapacityRequirements original

Properties

View Source

EqualityContract

Declaration
protected virtual Type EqualityContract { get; }
Property Value
Type Description
Type
View Source

Requests

Requests represent individual device resource requests for distinct resources, all of which must be provided by the device.

This value is used as an additional filtering condition against the available capacity on the device. This is semantically equivalent to a CEL selector with device.capacity[<domain>].<name>.compareTo(quantity(<request quantity>)) >= 0. For example, device.capacity['test-driver.cdi.k8s.io'].counters.compareTo(quantity('2')) >= 0.

When a requestPolicy is defined, the requested amount is adjusted upward to the nearest valid value based on the policy. If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows— the device is considered ineligible for allocation.

For any capacity that is not explicitly requested: - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity (i.e., the whole device is claimed).

  • If a requestPolicy is set, the default consumed capacity is determined according to that policy.

If the device allows multiple allocation, the aggregated amount across all requests must not exceed the capacity value. The consumed capacity, which may be adjusted based on the requestPolicy if defined, is recorded in the resource claim’s status.devices[*].consumedCapacity field.

Declaration
[JsonPropertyName("requests")]
public IDictionary<string, ResourceQuantity> Requests { get; set; }
Property Value
Type Description
IDictionary<string, ResourceQuantity>

Methods

View Source

Equals(object?)

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
object.Equals(object)
View Source

Equals(V1beta1CapacityRequirements?)

Declaration
public virtual bool Equals(V1beta1CapacityRequirements? other)
Parameters
Type Name Description
V1beta1CapacityRequirements other
Returns
Type Description
bool
View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
object.GetHashCode()
View Source

PrintMembers(StringBuilder)

Declaration
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
Type Name Description
StringBuilder builder
Returns
Type Description
bool
View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()

Operators

View Source

operator ==(V1beta1CapacityRequirements?, V1beta1CapacityRequirements?)

Declaration
public static bool operator ==(V1beta1CapacityRequirements? left, V1beta1CapacityRequirements? right)
Parameters
Type Name Description
V1beta1CapacityRequirements left
V1beta1CapacityRequirements right
Returns
Type Description
bool
View Source

operator !=(V1beta1CapacityRequirements?, V1beta1CapacityRequirements?)

Declaration
public static bool operator !=(V1beta1CapacityRequirements? left, V1beta1CapacityRequirements? right)
Parameters
Type Name Description
V1beta1CapacityRequirements left
V1beta1CapacityRequirements right
Returns
Type Description
bool

Implements

IEquatable<T>
  • View Source
In this article
Back to top Generated by DocFX