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 20 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
67 changes: 67 additions & 0 deletions docs/content/en/docs/implementing/evaluatemetrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,73 @@ Keptn metrics are implemented with two resources:
* [KeptnMetricsProvider](../yaml-crd-ref/metricsprovider.md) --
define the configuration for a data provider

### 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 provider into your KLT cluster:

1. Create a secret if your data provider uses one.
See
[Create secret text](../implementing/tasks/#create-secret-text).
1. Install and configure each instance of each data provider
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 providers.
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-provider
namespace: simplenode-dev
spec:
type: prometheus
targetServer: "http://prometheus-k8s.monitoring.svc.cluster.local:9090"
```

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

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

## Accessing Metrics via the Kubernetes Custom Metrics API

`KeptnMetrics` can also be retrieved via the Kubernetes Custom Metrics API.
Expand Down
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
52 changes: 50 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,51 @@ 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

By default, KLT includes additional observability features
that are not included in Keptn v1:

* [DORA metrics](../../implementing/dora)
* [OpenTelemetry observability](../../implementing/otel.md)

Keptn v1 Quality Gates can be migrated into KLT metrics
and KLT evaluations.

> **Note**
The full SLO capabilities
provided by Keptn v1 such as weighting and scoring
are currently under development for KLT.
You can follow and participate in the design and implementation process at
[Github epic 1785](https://github.com/keptn/lifecycle-toolkit/pull/1785).
Comment on lines +27 to +32
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will create a ticket to don't forget removing this piece when we'll finish the implementation :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed! When the implementation is complete, I'll need to rewrite this section plus we have a page about migrating SLO's to KLT where we can write up all the elegant details.


Notice the paradigm differences when implementing KLT evaluations:

* 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 provider.
This resource specifies the URL and namespace for the data provider
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
should be converted into its own
[KeptnMetric](../../yaml-crd-ref/metric.md) resource
if you are using it for an evaluation.
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
but are under development.

For more information about working with Keptn metrics, see the
[Keptn Metrics](../../implementing/evaluatemetrics.md)
page.