MetricSpec specifies how to scale based on a single metric (only type
and one other matching field should be set at once).
new()
withType(type)
type is the type of metric source. It should be one of “Object”, “Pods” or “Resource”, each mapping to a matching field in the object.
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).
mixinInstance(external)
metric identifies the target metric by name and selector
mixinInstance(metric)
withName(name)
name is the name of the given metric
selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.
mixinInstance(selector)
withMatchExpressions(matchExpressions)
matchExpressions is a list of label selector requirements. The requirements are ANDed.
withMatchExpressions
takes an array of type matchExpressionsType
. You can create
an instance of matchExpressionsType
with hidden.meta.v1.labelSelectorRequirement.new()
.
see hidden.meta.v1.labelSelectorRequirement
withMatchExpressionsMixin(matchExpressions)
matchExpressions is a list of label selector requirements. The requirements are ANDed.
withMatchExpressionsMixin
takes an array of type matchExpressionsType
. You can create
an instance of matchExpressionsType
with hidden.meta.v1.labelSelectorRequirement.new()
.
see hidden.meta.v1.labelSelectorRequirement
withMatchLabels(matchLabels)
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
withMatchLabelsMixin(matchLabels)
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
target specifies the target value for the given metric
mixinInstance(target)
withAverageUtilization(averageUtilization)
averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type
withType(type)
type represents whether the metric type is Utilization, Value, or AverageValue
averageValue is the target value of the average of the metric across all relevant pods (as a quantity)
mixinInstance(averageValue)
value is the target value of the metric (as a quantity).
mixinInstance(value)
object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).
mixinInstance(object)
mixinInstance(describedObject)
withKind(kind)
Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
withName(name)
Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
metric identifies the target metric by name and selector
mixinInstance(metric)
withName(name)
name is the name of the given metric
selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.
mixinInstance(selector)
withMatchExpressions(matchExpressions)
matchExpressions is a list of label selector requirements. The requirements are ANDed.
withMatchExpressions
takes an array of type matchExpressionsType
. You can create
an instance of matchExpressionsType
with hidden.meta.v1.labelSelectorRequirement.new()
.
see hidden.meta.v1.labelSelectorRequirement
withMatchExpressionsMixin(matchExpressions)
matchExpressions is a list of label selector requirements. The requirements are ANDed.
withMatchExpressionsMixin
takes an array of type matchExpressionsType
. You can create
an instance of matchExpressionsType
with hidden.meta.v1.labelSelectorRequirement.new()
.
see hidden.meta.v1.labelSelectorRequirement
withMatchLabels(matchLabels)
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
withMatchLabelsMixin(matchLabels)
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
target specifies the target value for the given metric
mixinInstance(target)
withAverageUtilization(averageUtilization)
averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type
withType(type)
type represents whether the metric type is Utilization, Value, or AverageValue
averageValue is the target value of the average of the metric across all relevant pods (as a quantity)
mixinInstance(averageValue)
value is the target value of the metric (as a quantity).
mixinInstance(value)
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.
mixinInstance(pods)
metric identifies the target metric by name and selector
mixinInstance(metric)
withName(name)
name is the name of the given metric
selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.
mixinInstance(selector)
withMatchExpressions(matchExpressions)
matchExpressions is a list of label selector requirements. The requirements are ANDed.
withMatchExpressions
takes an array of type matchExpressionsType
. You can create
an instance of matchExpressionsType
with hidden.meta.v1.labelSelectorRequirement.new()
.
see hidden.meta.v1.labelSelectorRequirement
withMatchExpressionsMixin(matchExpressions)
matchExpressions is a list of label selector requirements. The requirements are ANDed.
withMatchExpressionsMixin
takes an array of type matchExpressionsType
. You can create
an instance of matchExpressionsType
with hidden.meta.v1.labelSelectorRequirement.new()
.
see hidden.meta.v1.labelSelectorRequirement
withMatchLabels(matchLabels)
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
withMatchLabelsMixin(matchLabels)
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
target specifies the target value for the given metric
mixinInstance(target)
withAverageUtilization(averageUtilization)
averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type
withType(type)
type represents whether the metric type is Utilization, Value, or AverageValue
averageValue is the target value of the average of the metric across all relevant pods (as a quantity)
mixinInstance(averageValue)
value is the target value of the metric (as a quantity).
mixinInstance(value)
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.
mixinInstance(resource)
withName(name)
name is the name of the resource in question.
target specifies the target value for the given metric
mixinInstance(target)
withAverageUtilization(averageUtilization)
averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type
withType(type)
type represents whether the metric type is Utilization, Value, or AverageValue
averageValue is the target value of the average of the metric across all relevant pods (as a quantity)
mixinInstance(averageValue)
value is the target value of the metric (as a quantity).
mixinInstance(value)