From 60624e5f94744e25322243dbdc2212a7d7584213 Mon Sep 17 00:00:00 2001 From: odubajDT Date: Wed, 1 Mar 2023 09:21:18 +0100 Subject: [PATCH 01/19] docs: splitting operator to klt-operator and metrics-operator Signed-off-by: odubajDT --- README.md | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 531c63ad87..6687138be3 100644 --- a/README.md +++ b/README.md @@ -386,26 +386,27 @@ kind: KeptnEvaluationDefinition metadata: name: my-prometheus-evaluation spec: - source: prometheus objectives: - - name: query-1 - query: "xxxx" + - keptnMetricRef: + name: cpu + namespace: ns evaluationTarget: <20 - - name: query-2 - query: "yyyy" + - keptnMetricRef: + name: memory + namespace: ns evaluationTarget: >4 ``` -### Keptn Evaluation Provider +### Keptn Metrics Provider -A `KeptnEvaluationProvider` is a CRD used to define evaluation provider, which will provide data for the +A `KeptnMetricsProvider` is a CRD used to define evaluation provider, which will provide data for the pre- and post-analysis phases of a workload or application. -A Keptn evaluation provider looks like the following: +A Keptn metrics provider looks like the following: ```yaml -apiVersion: lifecycle.keptn.sh/v1alpha2 -kind: KeptnEvaluationProvider +apiVersion: metrics.keptn.sh/v1alpha2 +kind: KeptnMetricsProvider metadata: name: prometheus spec: @@ -414,6 +415,8 @@ spec: key: prometheusLoginCredentials ``` +**Note:** If using version 0.6.0 or older, please see the migration documentation when upgrading to 0.7.0. + ### Keptn Metric A `KeptnMetric` is a CRD used to define SLI provider with a query and to store metric data fetched from the provider. @@ -423,7 +426,7 @@ Furthermore, this allows using multiple observability platforms for different me A `KeptnMetric` looks like the following: ```yaml -apiVersion: metrics.keptn.sh/v1alpha1 +apiVersion: metrics.keptn.sh/v1alpha2 kind: KeptnMetric metadata: name: keptnmetric-sample @@ -435,12 +438,15 @@ spec: fetchIntervalSeconds: 5 ``` -To be able to use `KeptnMetric` as part of your evaluation, you need to add `keptn-metric` as your value -for `.spec.source` in `KeptnEvaluationDefiniton`. Further you need specify -the `.spec.objectives[i].name` of `KeptnEvaluationDefiniton` to the same value as it is stored in `.metadata.name` -of `KeptnMetric` resource. The `.spec.objectives[i].query` parameter -of `KeptnEvaluationDefiniton` will be ignored and `.spec.query` of `KeptnMetric` will be use instead as a query to fetch -the data. +To be able to use `KeptnMetric` as part of your evaluation, you need specify the +`.spec.objectives[i].keptnMetricRef.name` and `.spec.objectives[i].keptnMetricRef.namespace` of +`KeptnEvaluationDefiniton` to the same value as it is stored in `.metadata.name` and `metafata.namespace` +of `KeptnMetric` resource. Specifying the `.spec.objectives[i].keptnMetricRef.namespace` is optional. +If it's not specified, it will search for `KeptnMetric` resource in the namespace where `KeptnEvaluationDefinition` +is stored. If the `KeptnMetric` resource cannot be found there, it will fallback to search in the default KLT namespace. + +**Note:** Please be aware, that if `.spec.objectives[i].keptnMetricRef.namespace` of `KeptnEvaluationDefinition` +resource is specified and the `KeptnMetric` resource does not exist in this namespace, the evaluation fails. ## Install a dev build From aee5ca552ea1586ed4976ba07184e050a915e23a Mon Sep 17 00:00:00 2001 From: odubajDT Date: Wed, 1 Mar 2023 09:39:06 +0100 Subject: [PATCH 02/19] adapt Signed-off-by: odubajDT --- docs/content/en/docs/snippets/tasks/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/en/docs/snippets/tasks/install.md b/docs/content/en/docs/snippets/tasks/install.md index df8c8fc3e6..26d5f402cd 100644 --- a/docs/content/en/docs/snippets/tasks/install.md +++ b/docs/content/en/docs/snippets/tasks/install.md @@ -7,7 +7,7 @@ In version 0.6.0 and later, you can install the Lifecycle Toolkit using the curr ```shell -kubectl apply -f https://github.com/keptn/lifecycle-toolkit/releases/download/v0.5.0/manifest.yaml +kubectl apply -f https://github.com/keptn/lifecycle-toolkit/releases/download/v0.6.0/manifest.yaml kubectl wait --for=condition=Available deployment/lifecycle-operator -n keptn-lifecycle-toolkit-system --timeout=120s ``` From 2bddb25061576aa851e34c2466b2c1c64e81c99f Mon Sep 17 00:00:00 2001 From: odubajDT <93584209+odubajDT@users.noreply.github.com> Date: Wed, 1 Mar 2023 13:10:48 +0100 Subject: [PATCH 03/19] Update README.md Co-authored-by: Meg McRoberts Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6687138be3..91e9971b78 100644 --- a/README.md +++ b/README.md @@ -399,8 +399,8 @@ spec: ### Keptn Metrics Provider -A `KeptnMetricsProvider` is a CRD used to define evaluation provider, which will provide data for the -pre- and post-analysis phases of a workload or application. +A `KeptnMetricsProvider` is a CRD that defines the evaluation provider that provides data for the +pre- and post-analysis phases of a workload or Keptn application. A Keptn metrics provider looks like the following: From 50c9cf93327d309c4da7e02ac092db5c8c5fecc4 Mon Sep 17 00:00:00 2001 From: odubajDT <93584209+odubajDT@users.noreply.github.com> Date: Wed, 1 Mar 2023 13:10:59 +0100 Subject: [PATCH 04/19] Update README.md Co-authored-by: Meg McRoberts Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 91e9971b78..fd19156206 100644 --- a/README.md +++ b/README.md @@ -402,7 +402,7 @@ spec: A `KeptnMetricsProvider` is a CRD that defines the evaluation provider that provides data for the pre- and post-analysis phases of a workload or Keptn application. -A Keptn metrics provider looks like the following: +A Keptn metrics provider in a yaml file that looks like the following: ```yaml apiVersion: metrics.keptn.sh/v1alpha2 From 31f09cefc962fbf75e16c487a059a70a607d74bd Mon Sep 17 00:00:00 2001 From: odubajDT <93584209+odubajDT@users.noreply.github.com> Date: Wed, 1 Mar 2023 13:11:51 +0100 Subject: [PATCH 05/19] Update README.md Co-authored-by: Meg McRoberts Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com> --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fd19156206..fb0161b0ac 100644 --- a/README.md +++ b/README.md @@ -415,7 +415,10 @@ spec: key: prometheusLoginCredentials ``` -**Note:** If using version 0.6.0 or older, please see the migration documentation when upgrading to 0.7.0. +**Note:** The KeptnMetricsProvider is a new feature in KLT 0.7.0. +The migration documentation provides information about how to upgrade from 0.6.0 and earlier versions to 0.7.0. +about migrating +If using version 0.6.0 or older, please see the migration documentation when upgrading to 0.7.0. ### Keptn Metric From 4d66836c7bc93a461bb2cdbe7bb545453b25acbf Mon Sep 17 00:00:00 2001 From: odubajDT <93584209+odubajDT@users.noreply.github.com> Date: Wed, 1 Mar 2023 13:12:01 +0100 Subject: [PATCH 06/19] Update README.md Co-authored-by: Meg McRoberts Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fb0161b0ac..2824ec5858 100644 --- a/README.md +++ b/README.md @@ -422,7 +422,7 @@ If using version 0.6.0 or older, please see the migration documentation when upg ### Keptn Metric -A `KeptnMetric` is a CRD used to define SLI provider with a query and to store metric data fetched from the provider. +A `KeptnMetric` is a CRD that defines the SLI provider with a query and stores metric data fetched from the provider. Providing the metrics as CRD into a K8s cluster will facilitate the reusability of this data across multiple components. Furthermore, this allows using multiple observability platforms for different metrics. From 0c6aad79bc59e9b9a6f7fc0317350212eebd6135 Mon Sep 17 00:00:00 2001 From: odubajDT <93584209+odubajDT@users.noreply.github.com> Date: Wed, 1 Mar 2023 13:12:10 +0100 Subject: [PATCH 07/19] Update README.md Co-authored-by: Meg McRoberts Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2824ec5858..436696989d 100644 --- a/README.md +++ b/README.md @@ -426,7 +426,7 @@ A `KeptnMetric` is a CRD that defines the SLI provider with a query and stores m Providing the metrics as CRD into a K8s cluster will facilitate the reusability of this data across multiple components. Furthermore, this allows using multiple observability platforms for different metrics. -A `KeptnMetric` looks like the following: +A `KeptnMetric` is defined in a yaml file that looks like the following: ```yaml apiVersion: metrics.keptn.sh/v1alpha2 From 73f00c0d43c4130d9319fbb24d3b5ae4148f8587 Mon Sep 17 00:00:00 2001 From: odubajDT <93584209+odubajDT@users.noreply.github.com> Date: Wed, 1 Mar 2023 13:12:17 +0100 Subject: [PATCH 08/19] Update README.md Co-authored-by: Meg McRoberts Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 436696989d..35daf079ec 100644 --- a/README.md +++ b/README.md @@ -441,7 +441,7 @@ spec: fetchIntervalSeconds: 5 ``` -To be able to use `KeptnMetric` as part of your evaluation, you need specify the +To be able to use `KeptnMetric` as part of your evaluation, you must set the `.spec.objectives[i].keptnMetricRef.name` and `.spec.objectives[i].keptnMetricRef.namespace` of `KeptnEvaluationDefiniton` to the same value as it is stored in `.metadata.name` and `metafata.namespace` of `KeptnMetric` resource. Specifying the `.spec.objectives[i].keptnMetricRef.namespace` is optional. From 1497d02f0d151d6ab29b7bf70723cdb5a21a3ad9 Mon Sep 17 00:00:00 2001 From: odubajDT <93584209+odubajDT@users.noreply.github.com> Date: Wed, 1 Mar 2023 13:12:29 +0100 Subject: [PATCH 09/19] Update README.md Co-authored-by: Meg McRoberts Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 35daf079ec..dd98b5b6bc 100644 --- a/README.md +++ b/README.md @@ -443,7 +443,7 @@ spec: To be able to use `KeptnMetric` as part of your evaluation, you must set the `.spec.objectives[i].keptnMetricRef.name` and `.spec.objectives[i].keptnMetricRef.namespace` of -`KeptnEvaluationDefiniton` to the same value as it is stored in `.metadata.name` and `metafata.namespace` +`KeptnEvaluationDefiniton` to the same value that is stored in `.metadata.name` and `metafata.namespace` of `KeptnMetric` resource. Specifying the `.spec.objectives[i].keptnMetricRef.namespace` is optional. If it's not specified, it will search for `KeptnMetric` resource in the namespace where `KeptnEvaluationDefinition` is stored. If the `KeptnMetric` resource cannot be found there, it will fallback to search in the default KLT namespace. From 683f04c4996d3410b839c0d1d7ee8f106e679cd9 Mon Sep 17 00:00:00 2001 From: odubajDT <93584209+odubajDT@users.noreply.github.com> Date: Wed, 1 Mar 2023 13:13:24 +0100 Subject: [PATCH 10/19] Update README.md Co-authored-by: Meg McRoberts Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dd98b5b6bc..f2a0638926 100644 --- a/README.md +++ b/README.md @@ -445,8 +445,8 @@ To be able to use `KeptnMetric` as part of your evaluation, you must set the `.spec.objectives[i].keptnMetricRef.name` and `.spec.objectives[i].keptnMetricRef.namespace` of `KeptnEvaluationDefiniton` to the same value that is stored in `.metadata.name` and `metafata.namespace` of `KeptnMetric` resource. Specifying the `.spec.objectives[i].keptnMetricRef.namespace` is optional. -If it's not specified, it will search for `KeptnMetric` resource in the namespace where `KeptnEvaluationDefinition` -is stored. If the `KeptnMetric` resource cannot be found there, it will fallback to search in the default KLT namespace. +If it's not specified, KLT searches for the `KeptnMetric` resource in the namespace where `KeptnEvaluationDefinition` +is stored. If the `KeptnMetric` resource cannot be found there, it searches in the default KLT namespace. **Note:** Please be aware, that if `.spec.objectives[i].keptnMetricRef.namespace` of `KeptnEvaluationDefinition` resource is specified and the `KeptnMetric` resource does not exist in this namespace, the evaluation fails. From 93e425b18bde7196eb75abca70f66fa91d7d9ee5 Mon Sep 17 00:00:00 2001 From: odubajDT <93584209+odubajDT@users.noreply.github.com> Date: Wed, 1 Mar 2023 13:13:52 +0100 Subject: [PATCH 11/19] Update README.md Co-authored-by: Meg McRoberts Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com> --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f2a0638926..7a3c4b2267 100644 --- a/README.md +++ b/README.md @@ -448,7 +448,8 @@ of `KeptnMetric` resource. Specifying the `.spec.objectives[i].keptnMetricRef.na If it's not specified, KLT searches for the `KeptnMetric` resource in the namespace where `KeptnEvaluationDefinition` is stored. If the `KeptnMetric` resource cannot be found there, it searches in the default KLT namespace. -**Note:** Please be aware, that if `.spec.objectives[i].keptnMetricRef.namespace` of `KeptnEvaluationDefinition` +**Note:** Please be aware that, if + the `.spec.objectives[i].keptnMetricRef.namespace` of `KeptnEvaluationDefinition` resource is specified and the `KeptnMetric` resource does not exist in this namespace, the evaluation fails. ## Install a dev build From 9d81b916dcb68991c3b76e95afdd62bd3a4fe995 Mon Sep 17 00:00:00 2001 From: odubajDT Date: Wed, 1 Mar 2023 13:17:11 +0100 Subject: [PATCH 12/19] fix Signed-off-by: odubajDT --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7a3c4b2267..e82fbb1a1d 100644 --- a/README.md +++ b/README.md @@ -417,7 +417,7 @@ spec: **Note:** The KeptnMetricsProvider is a new feature in KLT 0.7.0. The migration documentation provides information about how to upgrade from 0.6.0 and earlier versions to 0.7.0. -about migrating +about migrating If using version 0.6.0 or older, please see the migration documentation when upgrading to 0.7.0. ### Keptn Metric @@ -448,7 +448,7 @@ of `KeptnMetric` resource. Specifying the `.spec.objectives[i].keptnMetricRef.na If it's not specified, KLT searches for the `KeptnMetric` resource in the namespace where `KeptnEvaluationDefinition` is stored. If the `KeptnMetric` resource cannot be found there, it searches in the default KLT namespace. -**Note:** Please be aware that, if +**Note:** Please be aware that, if the `.spec.objectives[i].keptnMetricRef.namespace` of `KeptnEvaluationDefinition` resource is specified and the `KeptnMetric` resource does not exist in this namespace, the evaluation fails. From 5dd750f4796fe69fc436315e4c686e6540e7278c Mon Sep 17 00:00:00 2001 From: odubajDT Date: Thu, 2 Mar 2023 14:51:11 +0100 Subject: [PATCH 13/19] fix docs Signed-off-by: odubajDT --- README.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e82fbb1a1d..bb91ebd61d 100644 --- a/README.md +++ b/README.md @@ -400,9 +400,9 @@ spec: ### Keptn Metrics Provider A `KeptnMetricsProvider` is a CRD that defines the evaluation provider that provides data for the -pre- and post-analysis phases of a workload or Keptn application. +pre- and post-analysis phases of a Keptn workload or Keptn application. -A Keptn metrics provider in a yaml file that looks like the following: +A Keptn metrics provider definition looks like the following: ```yaml apiVersion: metrics.keptn.sh/v1alpha2 @@ -415,10 +415,8 @@ spec: key: prometheusLoginCredentials ``` -**Note:** The KeptnMetricsProvider is a new feature in KLT 0.7.0. +**Note:** The KeptnMetricsProvider is a new resource in KLT 0.7.0. The migration documentation provides information about how to upgrade from 0.6.0 and earlier versions to 0.7.0. -about migrating -If using version 0.6.0 or older, please see the migration documentation when upgrading to 0.7.0. ### Keptn Metric @@ -426,7 +424,7 @@ A `KeptnMetric` is a CRD that defines the SLI provider with a query and stores m Providing the metrics as CRD into a K8s cluster will facilitate the reusability of this data across multiple components. Furthermore, this allows using multiple observability platforms for different metrics. -A `KeptnMetric` is defined in a yaml file that looks like the following: +A Keptn metric definition looks like the following: ```yaml apiVersion: metrics.keptn.sh/v1alpha2 @@ -443,10 +441,10 @@ spec: To be able to use `KeptnMetric` as part of your evaluation, you must set the `.spec.objectives[i].keptnMetricRef.name` and `.spec.objectives[i].keptnMetricRef.namespace` of -`KeptnEvaluationDefiniton` to the same value that is stored in `.metadata.name` and `metafata.namespace` +`KeptnEvaluationDefiniton` resource to the same value that is stored in `.metadata.name` and `metafata.namespace` of `KeptnMetric` resource. Specifying the `.spec.objectives[i].keptnMetricRef.namespace` is optional. If it's not specified, KLT searches for the `KeptnMetric` resource in the namespace where `KeptnEvaluationDefinition` -is stored. If the `KeptnMetric` resource cannot be found there, it searches in the default KLT namespace. +resource is stored. If the `KeptnMetric` resource cannot be found there, it searches in the default KLT namespace. **Note:** Please be aware that, if the `.spec.objectives[i].keptnMetricRef.namespace` of `KeptnEvaluationDefinition` From 417f64c34d0a91e5bf1603a9ad0c3f8514c3d996 Mon Sep 17 00:00:00 2001 From: odubajDT <93584209+odubajDT@users.noreply.github.com> Date: Fri, 3 Mar 2023 07:03:36 +0100 Subject: [PATCH 14/19] Update README.md Co-authored-by: Meg McRoberts Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bb91ebd61d..bcb257077a 100644 --- a/README.md +++ b/README.md @@ -399,7 +399,7 @@ spec: ### Keptn Metrics Provider -A `KeptnMetricsProvider` is a CRD that defines the evaluation provider that provides data for the +A `KeptnMetricsProvider` CRD defines the evaluation provider that provides data for the pre- and post-analysis phases of a Keptn workload or Keptn application. A Keptn metrics provider definition looks like the following: From f28cfa4a792ff7553218ed03dcc07773fa105340 Mon Sep 17 00:00:00 2001 From: odubajDT Date: Fri, 3 Mar 2023 12:06:05 +0100 Subject: [PATCH 15/19] fix docs Signed-off-by: odubajDT --- README.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index bcb257077a..148c9d26d0 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ keptn.sh/post-deployment-tasks: slack-notification,performance-test The value of these annotations are Keptn [CRDs](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) -called [KeptnTaskDefinition](#keptn-task-definition)s. These CRDs contains re-usable "functions" that can +called [KeptnTaskDefinition](#keptntaskdefinition)s. These CRDs contains re-usable "functions" that can executed before and after the deployment. In this example, before the deployment starts, a check for open problems in your infrastructure is performed. If everything is fine, the deployment continues and afterward, a slack notification is sent with the @@ -246,7 +246,7 @@ For each pod, at the very end of the scheduling cycle, the plugin verifies wheth terminated, by retrieving the current status of the WorkloadInstance. Only if that is successful, the pod is bound to a node. -### Keptn App +### KeptnApp An App contains information about all workloads and checks associated with an application. It will use the following structure for the specification of the pre/post deployment and pre/post evaluations checks @@ -275,7 +275,7 @@ spec: While changes in the workload version will affect only workload checks, a change in the app version will also cause a new execution of app level checks. -### Keptn Workload +### KeptnWorkload A Workload contains information about which tasks should be performed during the `preDeployment` as well as the `postDeployment` @@ -283,7 +283,7 @@ phase of a deployment. In its state it keeps track of the currently active `Work for doing those checks for a particular instance of a Deployment/StatefulSet/ReplicaSet (e.g. a Deployment of a certain version). -### Keptn Workload Instance +### KeptnWorkloadInstance A Workload Instance is responsible for executing the pre- and post deployment checks of a workload. In its state, it keeps track of the current status of all checks, as well as the overall state of @@ -293,7 +293,7 @@ desired state. If it detects that the referenced object has reached its desired state (e.g. all pods of a deployment are up and running), it will be able to tell that a `PostDeploymentCheck` can be triggered. -### Keptn Task Definition +### KeptnTaskDefinition A `KeptnTaskDefinition` is a CRD used to define tasks that can be run by the Keptn Lifecycle Toolkit as part of pre- and post-deployment phases of a deployment. @@ -307,7 +307,7 @@ A task definition can be configured in three different ways: - referring to an HTTP script - referring to another `KeptnTaskDefinition` -An inline task definition looks like the following: +An inline KeptnTaskDefinition looks like the following: ```yaml apiVersion: lifecycle.keptn.sh/v1alpha2 @@ -367,18 +367,18 @@ K8s secrets can also be passed to the function using the `secureParameters` fiel Here, the `secret` value is the K8s secret name that will be mounted into the runtime and made available to the function via the environment variable `SECURE_DATA`. -### Keptn Task +### KeptnTask A Task is responsible for executing the TaskDefinition of a workload. The execution is done spawning a K8s Job to handle a single Task. In its state, it keeps track of the current status of the K8s Job created. -### Keptn Evaluation Definition +### KeptnEvaluationDefinition A `KeptnEvaluationDefinition` is a CRD used to define evaluation tasks that can be run by the Keptn Lifecycle Toolkit as part of pre- and post-analysis phases of a workload or application. -A Keptn evaluation definition looks like the following: +A KeptnEvaluationDefinition looks like the following: ```yaml apiVersion: lifecycle.keptn.sh/v1alpha2 @@ -397,12 +397,12 @@ spec: evaluationTarget: >4 ``` -### Keptn Metrics Provider +### KeptnMetricsProvider A `KeptnMetricsProvider` CRD defines the evaluation provider that provides data for the pre- and post-analysis phases of a Keptn workload or Keptn application. -A Keptn metrics provider definition looks like the following: +A KeptnMetricsProvider definition looks like the following: ```yaml apiVersion: metrics.keptn.sh/v1alpha2 @@ -418,13 +418,13 @@ spec: **Note:** The KeptnMetricsProvider is a new resource in KLT 0.7.0. The migration documentation provides information about how to upgrade from 0.6.0 and earlier versions to 0.7.0. -### Keptn Metric +### KeptnMetric -A `KeptnMetric` is a CRD that defines the SLI provider with a query and stores metric data fetched from the provider. -Providing the metrics as CRD into a K8s cluster will facilitate the reusability of this data across multiple components. +A `KeptnMetric` CRD defines the SLI provider with a query and stores metric data fetched from the provider. +Providing the metrics as CRD into a Kubernetes cluster makes this data reusable across multiple projects or workloads. Furthermore, this allows using multiple observability platforms for different metrics. -A Keptn metric definition looks like the following: +A KeptnMetric definition looks like the following: ```yaml apiVersion: metrics.keptn.sh/v1alpha2 @@ -439,10 +439,10 @@ spec: fetchIntervalSeconds: 5 ``` -To be able to use `KeptnMetric` as part of your evaluation, you must set the +To use `KeptnMetric` as part of your evaluation, you must set the `.spec.objectives[i].keptnMetricRef.name` and `.spec.objectives[i].keptnMetricRef.namespace` of `KeptnEvaluationDefiniton` resource to the same value that is stored in `.metadata.name` and `metafata.namespace` -of `KeptnMetric` resource. Specifying the `.spec.objectives[i].keptnMetricRef.namespace` is optional. +of the `KeptnMetric` resource. Specifying the `.spec.objectives[i].keptnMetricRef.namespace` is optional. If it's not specified, KLT searches for the `KeptnMetric` resource in the namespace where `KeptnEvaluationDefinition` resource is stored. If the `KeptnMetric` resource cannot be found there, it searches in the default KLT namespace. From 5a7838e354a7c608556f712e2ad124d47d5d3203 Mon Sep 17 00:00:00 2001 From: odubajDT Date: Mon, 6 Mar 2023 08:49:27 +0100 Subject: [PATCH 16/19] add link to migration docs Signed-off-by: odubajDT --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 148c9d26d0..a16a211415 100644 --- a/README.md +++ b/README.md @@ -416,7 +416,8 @@ spec: ``` **Note:** The KeptnMetricsProvider is a new resource in KLT 0.7.0. -The migration documentation provides information about how to upgrade from 0.6.0 and earlier versions to 0.7.0. +The [migration documentation](./docs/content/en/docs/tasks/migrate-keptnevaluationprovider/_index.md) +provides information about how to upgrade from 0.6.0 and earlier versions to 0.7.0. ### KeptnMetric From ddc49c3e80b19dcdaeea292c371d5a6fc4e647a2 Mon Sep 17 00:00:00 2001 From: odubajDT Date: Mon, 6 Mar 2023 10:32:36 +0100 Subject: [PATCH 17/19] bump lifecycle version to v1alpha3 Signed-off-by: odubajDT --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a16a211415..43cf758350 100644 --- a/README.md +++ b/README.md @@ -253,7 +253,7 @@ It will use the following structure for the specification of the pre/post deploy that should be executed at app level: ```yaml -apiVersion: lifecycle.keptn.sh/v1alpha2 +apiVersion: lifecycle.keptn.sh/v1alpha3 kind: KeptnApp metadata: name: podtato-head @@ -310,7 +310,7 @@ A task definition can be configured in three different ways: An inline KeptnTaskDefinition looks like the following: ```yaml -apiVersion: lifecycle.keptn.sh/v1alpha2 +apiVersion: lifecycle.keptn.sh/v1alpha3 kind: KeptnTaskDefinition metadata: name: deployment-hello @@ -328,7 +328,7 @@ To runtime can also fetch the script on the fly from a remote webserver. For thi following: ```yaml -apiVersion: lifecycle.keptn.sh/v1alpha2 +apiVersion: lifecycle.keptn.sh/v1alpha3 kind: KeptnTaskDefinition metadata: name: hello-keptn-http @@ -344,7 +344,7 @@ Finally, `KeptnTaskDefinition` can build on top of other `KeptnTaskDefinition`s. This is a common use case where a general function can be re-used in multiple places with different parameters. ```yaml -apiVersion: lifecycle.keptn.sh/v1alpha2 +apiVersion: lifecycle.keptn.sh/v1alpha3 kind: KeptnTaskDefinition metadata: name: slack-notification-dev @@ -381,7 +381,7 @@ as part of pre- and post-analysis phases of a workload or application. A KeptnEvaluationDefinition looks like the following: ```yaml -apiVersion: lifecycle.keptn.sh/v1alpha2 +apiVersion: lifecycle.keptn.sh/v1alpha3 kind: KeptnEvaluationDefinition metadata: name: my-prometheus-evaluation From 5c0cfa0f5d5a23c55bb469d5b2580a553be6da33 Mon Sep 17 00:00:00 2001 From: odubajDT <93584209+odubajDT@users.noreply.github.com> Date: Mon, 6 Mar 2023 11:11:49 +0100 Subject: [PATCH 18/19] Update README.md Co-authored-by: Florian Bacher Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 43cf758350..4c863b93ff 100644 --- a/README.md +++ b/README.md @@ -442,7 +442,7 @@ spec: To use `KeptnMetric` as part of your evaluation, you must set the `.spec.objectives[i].keptnMetricRef.name` and `.spec.objectives[i].keptnMetricRef.namespace` of -`KeptnEvaluationDefiniton` resource to the same value that is stored in `.metadata.name` and `metafata.namespace` +`KeptnEvaluationDefiniton` resource to the same value that is stored in `.metadata.name` and `metadata.namespace` of the `KeptnMetric` resource. Specifying the `.spec.objectives[i].keptnMetricRef.namespace` is optional. If it's not specified, KLT searches for the `KeptnMetric` resource in the namespace where `KeptnEvaluationDefinition` resource is stored. If the `KeptnMetric` resource cannot be found there, it searches in the default KLT namespace. From 92d30038316aecadd4621ea107b9d65b750c5074 Mon Sep 17 00:00:00 2001 From: odubajDT <93584209+odubajDT@users.noreply.github.com> Date: Mon, 6 Mar 2023 11:12:00 +0100 Subject: [PATCH 19/19] Update README.md Co-authored-by: Florian Bacher Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4c863b93ff..bb653c5ca4 100644 --- a/README.md +++ b/README.md @@ -445,7 +445,7 @@ To use `KeptnMetric` as part of your evaluation, you must set the `KeptnEvaluationDefiniton` resource to the same value that is stored in `.metadata.name` and `metadata.namespace` of the `KeptnMetric` resource. Specifying the `.spec.objectives[i].keptnMetricRef.namespace` is optional. If it's not specified, KLT searches for the `KeptnMetric` resource in the namespace where `KeptnEvaluationDefinition` -resource is stored. If the `KeptnMetric` resource cannot be found there, it searches in the default KLT namespace. +resource is stored. If the `KeptnMetric` resource cannot be found there, it searches in the default KLT namespace (`keptn-lifecycle-toolkit-system`). **Note:** Please be aware that, if the `.spec.objectives[i].keptnMetricRef.namespace` of `KeptnEvaluationDefinition`