Skip to content

v1alpha3

Reference information for metrics.keptn.sh/v1alpha3

Packages

metrics.keptn.sh/v1alpha3

Package v1alpha3 contains API Schema definitions for the metrics v1alpha3 API group

Resource Types

Analysis

Analysis is the Schema for the analyses API

Appears in: - AnalysisList

Field Description Default Optional Validation
apiVersion string metrics.keptn.sh/v1alpha3
kind string Analysis
metadata ObjectMeta Refer to Kubernetes API documentation about metadata.
spec AnalysisSpec
status AnalysisStatus

AnalysisDefinition

AnalysisDefinition is the Schema for the analysisdefinitions APIs

Appears in: - AnalysisDefinitionList

Field Description Default Optional Validation
apiVersion string metrics.keptn.sh/v1alpha3
kind string AnalysisDefinition
metadata ObjectMeta Refer to Kubernetes API documentation about metadata.
spec AnalysisDefinitionSpec
status string unused field

AnalysisDefinitionList

AnalysisDefinitionList contains a list of AnalysisDefinition

Field Description Default Optional Validation
apiVersion string metrics.keptn.sh/v1alpha3
kind string AnalysisDefinitionList
metadata ListMeta
items AnalysisDefinition array x

AnalysisDefinitionSpec

AnalysisDefinitionSpec defines the desired state of AnalysisDefinition

Appears in: - AnalysisDefinition

Field Description Default Optional Validation
objectives Objective array Objectives defines a list of objectives to evaluate for an analysis
totalScore TotalScore TotalScore defines the required score for an analysis to be successful x

AnalysisList

AnalysisList contains a list of Analysis

Field Description Default Optional Validation
apiVersion string metrics.keptn.sh/v1alpha3
kind string AnalysisList
metadata ListMeta
items Analysis array x

AnalysisSpec

AnalysisSpec defines the desired state of Analysis

Appears in: - Analysis

Field Description Default Optional Validation
timeframe Timeframe Timeframe specifies the range for the corresponding query in the AnalysisValueTemplate. Please note that either
a combination of 'from' and 'to' or the 'recent' property may be set. If neither is set, the Analysis can
not be added to the cluster.
x
args object (keys:string, values:string) Args corresponds to a map of key/value pairs that can be used to substitute placeholders in the AnalysisValueTemplate query. i.e. for args foo:bar the query could be "query:percentile(95)?scope=tag(my_foo_label:{{.foo}})".
analysisDefinition ObjectReference AnalysisDefinition refers to the AnalysisDefinition, a CRD that stores the AnalysisValuesTemplates x

AnalysisState

Underlying type: string

AnalysisState represents the state of the analysis

Appears in: - AnalysisStatus

AnalysisStatus

AnalysisStatus stores the status of the overall analysis returns also pass or warnings

Appears in: - Analysis

Field Description Default Optional Validation
timeframe Timeframe Timeframe describes the time frame which is evaluated by the Analysis x
raw string Raw contains the raw result of the SLO computation
pass boolean Pass returns whether the SLO is satisfied
warning boolean Warning returns whether the analysis returned a warning
state string State describes the current state of the Analysis (Pending/Progressing/Completed) x
storedValues object (keys:string, values:ProviderResult) StoredValues contains all analysis values that have already been retrieved successfully

AnalysisValueTemplate

AnalysisValueTemplate is the Schema for the analysisvaluetemplates API

Appears in: - AnalysisValueTemplateList

Field Description Default Optional Validation
apiVersion string metrics.keptn.sh/v1alpha3
kind string AnalysisValueTemplate
metadata ObjectMeta Refer to Kubernetes API documentation about metadata.
spec AnalysisValueTemplateSpec Spec contains the specification for the AnalysisValueTemplate
status string unused field

AnalysisValueTemplateList

AnalysisValueTemplateList contains a list of AnalysisValueTemplate

Field Description Default Optional Validation
apiVersion string metrics.keptn.sh/v1alpha3
kind string AnalysisValueTemplateList
metadata ListMeta
items AnalysisValueTemplate array x

AnalysisValueTemplateSpec

AnalysisValueTemplateSpec defines the desired state of AnalysisValueTemplate

Appears in: - AnalysisValueTemplate

Field Description Default Optional Validation
provider ObjectReference Provider refers to the KeptnMetricsProvider which should be used to retrieve the data x
query string Query represents the query to be run. It can include placeholders that are defined using the go template
syntax. More info on go templating - https://pkg.go.dev/text/template
x

IntervalResult

Appears in: - KeptnMetricStatus

Field Description Default Optional Validation
value string Value represents the resulting value x
range RangeSpec Range represents the time range for which this data was queried x
lastUpdated Time LastUpdated represents the time when the status data was last updated x
errMsg string ErrMsg represents the error details when the query could not be evaluated

KeptnMetric

KeptnMetric is the Schema for the keptnmetrics API

Appears in: - KeptnMetricList

Field Description Default Optional Validation
apiVersion string metrics.keptn.sh/v1alpha3
kind string KeptnMetric
metadata ObjectMeta Refer to Kubernetes API documentation about metadata.
spec KeptnMetricSpec
status KeptnMetricStatus

KeptnMetricList

KeptnMetricList contains a list of KeptnMetric

Field Description Default Optional Validation
apiVersion string metrics.keptn.sh/v1alpha3
kind string KeptnMetricList
metadata ListMeta
items KeptnMetric array x

KeptnMetricSpec

KeptnMetricSpec defines the desired state of KeptnMetric

Appears in: - KeptnMetric

Field Description Default Optional Validation
provider ProviderRef Provider represents the provider object x
query string Query represents the query to be run x
fetchIntervalSeconds integer FetchIntervalSeconds represents the update frequency in seconds that is used to update the metric x
range RangeSpec Range represents the time range for which data is to be queried

KeptnMetricStatus

KeptnMetricStatus defines the observed state of KeptnMetric

Appears in: - KeptnMetric

Field Description Default Optional Validation
value string Value represents the resulting value
rawValue integer array RawValue represents the resulting value in raw format
lastUpdated Time LastUpdated represents the time when the status data was last updated
errMsg string ErrMsg represents the error details when the query could not be evaluated
intervalResults IntervalResult array IntervalResults contain a slice of all the interval results

KeptnMetricsProvider

KeptnMetricsProvider is the Schema for the keptnmetricsproviders API

Appears in: - KeptnMetricsProviderList

Field Description Default Optional Validation
apiVersion string metrics.keptn.sh/v1alpha3
kind string KeptnMetricsProvider
metadata ObjectMeta Refer to Kubernetes API documentation about metadata.
spec KeptnMetricsProviderSpec
status string unused field

KeptnMetricsProviderList

KeptnMetricsProviderList contains a list of KeptnMetricsProvider

Field Description Default Optional Validation
apiVersion string metrics.keptn.sh/v1alpha3
kind string KeptnMetricsProviderList
metadata ListMeta
items KeptnMetricsProvider array x

KeptnMetricsProviderSpec

KeptnMetricsProviderSpec defines the desired state of KeptnMetricsProvider

Appears in: - KeptnMetricsProvider

Field Description Default Optional Validation
type string Type represents the provider type. This can be one of prometheus, dynatrace, datadog, dql. x Optional: {}
Pattern: prometheus|dynatrace|datadog|dql
targetServer string TargetServer defined the URL at which the metrics provider is reachable with included port and protocol. x
secretKeyRef SecretKeySelector SecretKeyRef defines an optional secret for access credentials to the metrics provider. Optional: {}

ObjectReference

Appears in: - AnalysisSpec - AnalysisValueTemplateSpec - Objective - ProviderResult

Field Description Default Optional Validation
name string Name defines the name of the referenced object x
namespace string Namespace defines the namespace of the referenced object

Objective

Objective defines an objective for analysis

Appears in: - AnalysisDefinitionSpec

Field Description Default Optional Validation
analysisValueTemplateRef ObjectReference AnalysisValueTemplateRef refers to the appropriate AnalysisValueTemplate x
target Target Target defines failure or warning criteria
weight integer Weight can be used to emphasize the importance of one Objective over the others 1
keyObjective boolean KeyObjective defines whether the whole analysis fails when this objective's target is not met false

Operator

Operator specifies the supported operators for value comparisons

Appears in: - Target

Field Description Default Optional Validation
lessThanOrEqual OperatorValue LessThanOrEqual represents '<=' operator
lessThan OperatorValue LessThan represents '<' operator
greaterThan OperatorValue GreaterThan represents '>' operator
greaterThanOrEqual OperatorValue GreaterThanOrEqual represents '>=' operator
equalTo OperatorValue EqualTo represents '==' operator
inRange RangeValue InRange represents operator checking the value is inclusively in the defined range, e.g. 2 <= x <= 5
notInRange RangeValue NotInRange represents operator checking the value is exclusively out of the defined range, e.g. x < 2 AND x > 5

OperatorValue

OperatorValue represents the value to which the result is compared

Appears in: - Operator

Field Description Default Optional Validation
fixedValue Quantity FixedValue defines the value for comparison x

ProviderRef

ProviderRef represents the provider object

Appears in: - KeptnMetricSpec

Field Description Default Optional Validation
name string Name of the provider x

ProviderResult

ProviderResult stores reference of already collected provider query associated to its objective template

Appears in: - AnalysisStatus

Field Description Default Optional Validation
objectiveReference ObjectReference Objective store reference to corresponding objective template
query string Query represents the executed query
value string Value is the value the provider returned
errMsg string ErrMsg stores any possible error at retrieval time

RangeSpec

RangeSpec defines the time range for which data is to be queried

Appears in: - IntervalResult - KeptnMetricSpec

Field Description Default Optional Validation
interval string Interval specifies the duration of the time interval for the data query 5m
step string Step represents the query resolution step width for the data query
aggregation string Aggregation defines the type of aggregation function to be applied on the data. Accepted values: p90, p95, p99, max, min, avg, median Enum: [p90 p95 p99 max min avg median]
storedResults integer StoredResults indicates the upper limit of how many past results should be stored in the status of a KeptnMetric Maximum: 255

RangeValue

RangeValue represents a range which the value should fit

Appears in: - Operator

Field Description Default Optional Validation
lowBound Quantity LowBound defines the lower bound of the range x
highBound Quantity HighBound defines the higher bound of the range x

Target

Target defines the failure and warning criteria

Appears in: - Objective

Field Description Default Optional Validation
failure Operator Failure defines limits up to which an analysis fails
warning Operator Warning defines limits where the result does not pass or fail

Timeframe

Appears in: - AnalysisSpec - AnalysisStatus

Field Description Default Optional Validation
from Time From is the time of start for the query. This field follows RFC3339 time format
to Time To is the time of end for the query. This field follows RFC3339 time format
recent Duration Recent describes a recent timeframe using a duration string. E.g. Setting this to '5m' provides an Analysis
for the last five minutes
Pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
Type: string

TotalScore

TotalScore defines the required score for an analysis to be successful

Appears in: - AnalysisDefinitionSpec

Field Description Default Optional Validation
passPercentage integer PassPercentage defines the threshold to reach for an analysis to pass x Maximum: 100
Minimum: 0
warningPercentage integer WarningPercentage defines the threshold to reach for an analysis to pass with a 'warning' status x Maximum: 100
Minimum: 0