Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: explain namespaces for metrics and evaluations #1641

Merged
merged 8 commits into from
Jun 28, 2023
13 changes: 12 additions & 1 deletion docs/content/en/docs/yaml-crd-ref/evaluationdefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,22 @@ spec:
## Usage

A `KeptnEvaluationDefinition` references one or more
[KeptnMetric](metric.md) CRDs.
[KeptnMetric](metric.md) resources.
When multiple `KeptnMetric`s are used,
the Keptn Lifecycle Toolkit considers the evaluation successful
if **all** metrics meet their `evaluationTarget`.

The `KeptnMetric` resource and associated
[KeptnMetricsProvider](metricsprovider.md)
resource must be located in the same namespace
but the `KeptnEvaluationDefinition` resources
can reference metrics from any namespace in the cluster.
odubajDT marked this conversation as resolved.
Show resolved Hide resolved
This means that you can create `KeptnMetricsProvider`
and `KeptnMetric` resources
in a centralized namespace (e.g. in `keptn-lifecycle-toolkit-system`)
and use those metrics in evaluations
on all namespaces in the cluster.

## Example

```yaml
Expand Down
17 changes: 17 additions & 0 deletions docs/content/en/docs/yaml-crd-ref/metric.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,23 @@ spec:

## Usage

A `KeptnMetric` resource must be located
in the same namespace as the associated
[KeptnMetricsProvider](metricsprovider.md)
resource.
`KeptnMetric` resources are used to generate metrics for the cluster
and are used as the SLI (Service Level Indicator) for
[KeptnEvaluationDefinition](evaluationdefinition.md)
resources that are used for pre- and post-deployment evaluations.

`KeptnEvaluationDefinition` resources can reference metrics
odubajDT marked this conversation as resolved.
Show resolved Hide resolved
from any namespace.
This means that you can create `KeptnMetricsProvider`
and `KeptnMetric` resources
in a centralized namespace (e.g. in `keptn-lifecycle-toolkit-system`)
and access those metrics in evaluations
on all namespaces in the cluster.

## Example

This example pulls metrics from the data provider
Expand Down
17 changes: 17 additions & 0 deletions docs/content/en/docs/yaml-crd-ref/metricsprovider.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,23 @@ spec:

## Usage

A `KeptnMetricsProvider` resource must be located
in the same namespace as the
[KeptnMetric](metric.md)
resources that are associated with it.
`KeptnMetric` resources are used to generate metrics for the cluster
and are used as the SLI (Service Level Indicator) for
[KeptnEvaluationDefinition](evaluationdefinition.md)
resources that are used for pre- and post-deployment evaluations.

`KeptnEvaluationDefinition` resources can reference metrics
from any namespace.
This means that you can create `KeptnMetricsProvider`
and `KeptnMetric` resources
in a centralized namespace (e.g. in `keptn-lifecycle-toolkit-system`)
and access those metrics in evaluations
on all namespaces in the cluster.

## Examples

### Example 1: Dynatrace data provider
Expand Down
Loading