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: migrate quality gates #1708

Merged
merged 21 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b4b72ab
docs: migrate quality gates
StackScribe Jul 12, 2023
e285e4d
markdownlint errors
StackScribe Jul 12, 2023
d19a372
xrefs
StackScribe Jul 12, 2023
1cd0000
markdownlint
StackScribe Jul 12, 2023
722e862
DORA
StackScribe Jul 31, 2023
a5a51d8
Anna/Giovanni comments for migrate/metrics
StackScribe Aug 7, 2023
f612c5a
markdownlint xrefs
StackScribe Aug 7, 2023
57ca8c0
another xref
StackScribe Aug 7, 2023
530808b
Update docs/content/en/docs/implementing/evaluatemetrics.md
StackScribe Aug 9, 2023
5e94fb6
Update docs/content/en/docs/implementing/evaluatemetrics.md
StackScribe Aug 9, 2023
907b5eb
Update docs/content/en/docs/implementing/evaluatemetrics.md
StackScribe Aug 9, 2023
7aa3a18
Update docs/content/en/docs/implementing/evaluatemetrics.md
StackScribe Aug 9, 2023
3434e34
Update docs/content/en/docs/implementing/evaluatemetrics.md
StackScribe Aug 9, 2023
f860a84
Update docs/content/en/docs/implementing/evaluatemetrics.md
StackScribe Aug 9, 2023
fc9e477
Update docs/content/en/docs/implementing/evaluatemetrics.md
StackScribe Aug 9, 2023
bf6588c
Update docs/content/en/docs/implementing/evaluatemetrics.md
StackScribe Aug 9, 2023
de940e6
Update docs/content/en/docs/implementing/evaluatemetrics.md
StackScribe Aug 9, 2023
c569ba8
Update docs/content/en/docs/implementing/evaluatemetrics.md
StackScribe Aug 9, 2023
59eae57
Update docs/content/en/docs/migrate/metrics-observe/_index.md
StackScribe Aug 9, 2023
0c85467
Update docs/content/en/docs/migrate/metrics-observe/_index.md
StackScribe Aug 9, 2023
5c50d2d
Update docs/content/en/docs/migrate/metrics-observe/_index.md
odubajDT Aug 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/content/en/docs/install/k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ Your cluster should include the following:
[Prometheus](https://prometheus.io/),
[Dynatrace](https://www.dynatrace.com/),
or [Datadog](https://www.datadoghq.com/).
This is used for the metrics used for the observability features.
This is used for the metrics used for the observability features
as well as the pre- and post-deployment evaluations.

* Deployment tools of your choice,
such as
Expand Down
107 changes: 105 additions & 2 deletions docs/content/en/docs/migrate/metrics-observe/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Implement Keptn Metrics and Observability
description: Configure Keptn Metrics and Observability in your cluster
title: Migrate Quality Gates to KLT metrics and evaluations
description: How to translate Quality Gates into Keptn Metrics and evaluations
weight: 40
hidechildren: false # this flag hides all sub-pages in the sidebar-multicard.html
---
Expand All @@ -11,3 +11,106 @@ Information that is published here has been reviewed for technical accuracy
but the format and content is still evolving.
We hope you will contribute your experiences
and questions that you have.

The SLIs and SLOs used for Keptn v1 quality gates can be ported to
KLT Keptn Metrics and Keptn Evaluations.
odubajDT marked this conversation as resolved.
Show resolved Hide resolved

Note that KLT includes additional observability features
that are not included in Keptn v1 by default:

* [Dora metrics](../../implementing/dora)
StackScribe marked this conversation as resolved.
Show resolved Hide resolved
* [OpenTelemetry observability](../../implementing/otel.md)

Keptn v1 Quality Gates can be migrated into KLT metrics
and KLT evaluations.
Notice the paradigm differences:

* Data providers are installed and configured into your Kubernetes cluster
using Helm charts and standard practices.
* You must populate a
[KeptnMetricsProvider](../../yaml-crd-ref/metricsprovider.md) resource
for each instance of each data source.
StackScribe marked this conversation as resolved.
Show resolved Hide resolved
This resource specifies the URL and namespace for the data source
StackScribe marked this conversation as resolved.
Show resolved Hide resolved
and gives it a unique `name` that can be referenced by other resources.
This is the only KLT specific configuration that is required.
* Each query that is specified in your Keptn v1
[slo.yaml](https://keptn.sh/docs/1.0.x/reference/files/sli/) file
is converted into its own
StackScribe marked this conversation as resolved.
Show resolved Hide resolved
[KeptnMetric](../../yaml-crd-ref/metric.md) resource.
StackScribe marked this conversation as resolved.
Show resolved Hide resolved
Note that KLT supports using multiple instances of multiple data providers.
* Simple Keptn v1 comparisons that are defined in
[slo.yaml](https://keptn.sh/docs/1.0.x/reference/files/slo/)
files can be converted to
[KeptnEvaluationDefinition](../../yaml-crd-ref/evaluationdefinition.md)
resources.
Keptn v1 calculations that use weighting and scoring
cannot currently be converted to `KeptnEvaluationDefinition` resources.

## Define KeptnMetricsProvider resources

You must define a
[KeptnMetricsProvider](../../yaml-crd-ref/metricsprovider.md) resource
for each instance of each data provider you are using.

Note the following:

* Each `KeptnMetricsProvider` resource is bound to a specific namespace.
* Each `KeptnMetric` resource must be located in the same namespace
as the associated `KeptnMetricsProvider` resource.
* `KeptnEvaluationDefinition` resources can reference metrics
from any namespace in the cluster.
* To define metrics that can be used in evaluations
on all namespaces in the cluster,
create `KeptnMetricsProvider` and KeptnMetric resources
in a centralized namespace
such as `keptn-lifecycle-toolkit-system`.

To configure a data source into your KLT cluster:

1. Create a secret if your data source uses one.
See
[Create secret text](../../implementing/tasks/#create-secret-text).
1. Install and configure each instance of each data source
into your KLT cluster,
following the instructions provided by the data source provider.
See
[Prepare your cluster for KLT](../../install/k8s.md/#prepare-your-cluster-for-klt)
for links.
KLT supports using multiple instances of multiple data sources.
1. Define a
[KeptnMetricsProvider](../../yaml-crd-ref/metricsprovider.md)
resource for each data source.

For example, the `KeptnMetricProvider` resource
for a Prometheus data source that does not use a secret
could look like:

```yaml
apiVersion: metrics.keptn.sh/v1alpha2
kind: KeptnMetricsProvider
metadata:
name: prometheus
namespace: simplenode-dev
spec:
targetServer: "http://prometheus-k8s.monitoring.svc.cluster.local:9090"
```

The `KeptnMetricProvider resource for a Dynatrace data source
that uses a secret could look like:

```yaml
apiVersion: metrics.keptn.sh/v1alpha3
kind: KeptnMetricsProvider
metadata:
name: dynatrace
namespace: podtato-kubectl
spec:
targetServer: "<dynatrace-tenant-url>"
secretKeyRef:
name: dt-api-token
key: DT_TOKEN
```

## Create a KeptnMetric resource for each SLI

## Create KeptnEvaluationDefinition resources for SLOs