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
    • metric

      metric identifies the target metric by name and selector


      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.


    • target

      target specifies the target value for the given metric


      Functions
      • mixinInstance

        mixinInstance(target)
        


      • withAverageUtilization

        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

        withType(type)
        

        type represents whether the metric type is Utilization, Value, or AverageValue


      Mixins
      • averageValue

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


        Functions
      • value

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


        Functions
  • object

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


    Functions
    Mixins
    • describedObject


      Functions
    • metric

      metric identifies the target metric by name and selector


      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.


    • target

      target specifies the target value for the given metric


      Functions
      • mixinInstance

        mixinInstance(target)
        


      • withAverageUtilization

        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

        withType(type)
        

        type represents whether the metric type is Utilization, Value, or AverageValue


      Mixins
      • averageValue

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


        Functions
      • value

        value 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
    • metric

      metric identifies the target metric by name and selector


      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.


    • target

      target specifies the target value for the given metric


      Functions
      • mixinInstance

        mixinInstance(target)
        


      • withAverageUtilization

        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

        withType(type)
        

        type represents whether the metric type is Utilization, Value, or AverageValue


      Mixins
      • averageValue

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


        Functions
      • value

        value is the target value of the metric (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
    Mixins
    • target

      target specifies the target value for the given metric


      Functions
      • mixinInstance

        mixinInstance(target)
        


      • withAverageUtilization

        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

        withType(type)
        

        type represents whether the metric type is Utilization, Value, or AverageValue


      Mixins
      • averageValue

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


        Functions
      • value

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


        Functions