metricSpec

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

Constuctors

Functions
  • withType

    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.


Mixins
  • 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).


    Functions
    Mixins
    • metricSelector

      metricSelector is used to identify a specific time series within a given metric.


      Functions
      • mixinInstance

        mixinInstance(metricSelector)
        


      • withMatchExpressions

        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

        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

        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

        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

      targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.


      Functions
    • targetValue

      targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.


      Functions
  • object

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


    Functions
    Mixins
    • averageValue

      averageValue is the target value of the average of the metric across all relevant pods (as a quantity)


      Functions
    • selector

      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.


      Functions
      • mixinInstance

        mixinInstance(selector)
        


      • withMatchExpressions

        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

        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

        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

        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

      target is the described Kubernetes object.


      Functions
    • targetValue

      targetValue is the target value of the metric (as a quantity).


      Functions
  • 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.


    Functions
    Mixins
    • selector

      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.


      Functions
      • mixinInstance

        mixinInstance(selector)
        


      • withMatchExpressions

        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

        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

        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

        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

      targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)


      Functions
  • 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.


    Functions
    • mixinInstance

      mixinInstance(resource)
      


    • withName

      withName(name)
      

      name is the name of the resource in question.


    • withTargetAverageUtilization

      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.


    Mixins
    • targetAverageValue

      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.


      Functions