Skip to content

Commit

Permalink
docs: explain namespaces for metrics and evaluations (#1641)
Browse files Browse the repository at this point in the history
Co-authored-by: Florian Bacher <florian.bacher@dynatrace.com>
Co-authored-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
  • Loading branch information
3 people committed Jun 28, 2023
1 parent 7274cf7 commit 72f7038
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
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.
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
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

0 comments on commit 72f7038

Please sign in to comment.