package kubecaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

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

type t
val to_yojson : t -> Yojson.Safe.t
val of_yojson : Yojson.Safe.t -> t Ppx_deriving_yojson_runtime.error_or

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

object refers to a metric describing a single kubernetes object (for example, hits_per_second on an Ingress object).

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.

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.

val type_ : t -> string

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.

module Object : Object.S with type value := t
OCaml

Innovation. Community. Security.