Iter8 defines the Metric resource type, which encapsulates the REST query that is used to retrieve a metric value from the metrics provider. Metric resources are referenced in experiments.
This document describes version
v2alpha2 of Iter8's metric API.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Standard Kubernetes meta.v1/ObjectMeta resource.
|Field name||Field type||Description||Required|
|description||string||Human readable description. This field is meant for informational purposes.||No|
|units||string||Units of measurement. This field is meant for informational purposes.||No|
|provider||string||Type of the metrics provider (example, ||No|
|params||NamedValue||List of name/value pairs corresponding to the name and value of the HTTP query parameters used by Iter8 when querying the metrics provider. Each name represents a parameter name; the corresponding value is a string template with placeholders; the placeholders will be dynamically substituted by Iter8 with values at query time.||No|
|body||string||String used to construct the JSON body of the HTTP request. Body may be templated, in which Iter8 will attempt to substitute placeholders in the template at query time using version information.||No|
|type||string||Metric type. Valid values are ||No|
|method||string||HTTP method (verb) used in the HTTP request. Valid values are ||No|
|authType||string||Identifies the type of authentication used in the HTTP request. Valid values are ||No|
|sampleSize||string||Reference to a metric that represents the number of data points over which the value of this metric is computed. This field applies only to ||No|
|secret||string||Reference to a secret that contains information used for authenticating with the metrics provider. In particular, Iter8 uses data in this secret to substitute placeholders in the HTTP headers and URL while querying the provider. References can be expressed in the form 'name' or 'namespace/name'. If just ||No|
|headerTemplates||NamedValue||List of name/value pairs corresponding to the name and value of the HTTP request headers used by Iter8 when querying the metrics provider. Each name represents a header field name; the corresponding value is a string template with placeholders; the placeholders will be dynamically substituted by Iter8 with values at query time. Placeholder substitution is attempted only if ||No|
|jqExpression||string||The jq expression used by Iter8 to extract the metric value from the JSON response returned by the provider.||Yes|
|urlTemplate||string||Template for the metric provider's URL. Typically, urlTemplate is expected to be the actual URL without any placeholders. However, urlTemplate may be templated, in which case, Iter8 will attempt to substitute placeholders in the urlTemplate at query time using the ||Yes|