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)
withMetricName(metricName)
metricName is the name of the metric in question.
metricSelector is used to identify a specific time series within a given metric.
mixinInstance(metricSelector)
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.
targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.
mixinInstance(targetAverageValue)
targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.
mixinInstance(targetValue)
object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).
mixinInstance(object)
withMetricName(metricName)
metricName is the name of the metric in question.
averageValue is the target value of the average of the metric across all relevant pods (as a quantity)
mixinInstance(averageValue)
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 is the described Kubernetes object.
mixinInstance(target)
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
targetValue is the target value of the metric (as a quantity).
mixinInstance(targetValue)
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)
withMetricName(metricName)
metricName is the name of the metric in question
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.
targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)
mixinInstance(targetAverageValue)
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.
withTargetAverageUtilization(targetAverageUtilization)
targetAverageUtilization 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.
targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the "pods" metric source type.
mixinInstance(targetAverageValue)