Show / Hide Table of Contents

Class V2MetricSpec

MetricSpec specifies how to scale based on a single metric (only type and one other matching field should be set at once).

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

Constructors

View Source

V2MetricSpec()

Declaration
public V2MetricSpec()
View Source

V2MetricSpec(V2MetricSpec)

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

Properties

View Source

ContainerResource

containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source.

Declaration
[JsonPropertyName("containerResource")]
public V2ContainerResourceMetricSource ContainerResource { get; set; }
Property Value
Type Description
V2ContainerResourceMetricSource
View Source

EqualityContract

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

External

external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).

Declaration
[JsonPropertyName("external")]
public V2ExternalMetricSource External { get; set; }
Property Value
Type Description
V2ExternalMetricSource
View Source

ObjectProperty

object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).

Declaration
[JsonPropertyName("object")]
public V2ObjectMetricSource ObjectProperty { get; set; }
Property Value
Type Description
V2ObjectMetricSource
View Source

Pods

pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.

Declaration
[JsonPropertyName("pods")]
public V2PodsMetricSource Pods { get; set; }
Property Value
Type Description
V2PodsMetricSource
View Source

Resource

resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source.

Declaration
[JsonPropertyName("resource")]
public V2ResourceMetricSource Resource { get; set; }
Property Value
Type Description
V2ResourceMetricSource
View Source

Type

type is the type of metric source. It should be one of "ContainerResource", "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object.

Declaration
[JsonPropertyName("type")]
public string Type { get; set; }
Property Value
Type Description
string

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(V2MetricSpec?)

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

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

operator !=(V2MetricSpec?, V2MetricSpec?)

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

Implements

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