Show / Hide Table of Contents

Class V1CapacityRequestPolicy

CapacityRequestPolicy defines how requests consume device capacity.

Must not set more than one ValidRequestValues.

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

Constructors

View Source

V1CapacityRequestPolicy()

Declaration
public V1CapacityRequestPolicy()
View Source

V1CapacityRequestPolicy(V1CapacityRequestPolicy)

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

Properties

View Source

DefaultProperty

Default specifies how much of this capacity is consumed by a request that does not contain an entry for it in DeviceRequest's Capacity.

Declaration
[JsonPropertyName("default")]
public ResourceQuantity DefaultProperty { get; set; }
Property Value
Type Description
ResourceQuantity
View Source

EqualityContract

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

ValidRange

ValidRange defines an acceptable quantity value range in consuming requests.

If this field is set, Default must be defined and it must fall within the defined ValidRange.

If the requested amount does not fall within the defined range, the request violates the policy, and this device cannot be allocated.

If the request doesn't contain this capacity entry, Default value is used.

Declaration
[JsonPropertyName("validRange")]
public V1CapacityRequestPolicyRange ValidRange { get; set; }
Property Value
Type Description
V1CapacityRequestPolicyRange
View Source

ValidValues

ValidValues defines a set of acceptable quantity values in consuming requests.

Must not contain more than 10 entries. Must be sorted in ascending order.

If this field is set, Default must be defined and it must be included in ValidValues list.

If the requested amount does not match any valid value but smaller than some valid values, the scheduler calculates the smallest valid value that is greater than or equal to the request. That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues).

If the requested amount exceeds all valid values, the request violates the policy, and this device cannot be allocated.

Declaration
[JsonPropertyName("validValues")]
public IList<ResourceQuantity> ValidValues { get; set; }
Property Value
Type Description
IList<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(V1CapacityRequestPolicy?)

Declaration
public virtual bool Equals(V1CapacityRequestPolicy? other)
Parameters
Type Name Description
V1CapacityRequestPolicy 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 ==(V1CapacityRequestPolicy?, V1CapacityRequestPolicy?)

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

operator !=(V1CapacityRequestPolicy?, V1CapacityRequestPolicy?)

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

Implements

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