From 5cd726870f7562e2e4ebfcdadc680b99f81f8e23 Mon Sep 17 00:00:00 2001 From: Meg McRoberts Date: Mon, 30 Oct 2023 02:45:17 -0700 Subject: [PATCH 01/13] docs: analyses and namespaces Signed-off-by: Meg McRoberts --- .../en/docs/implementing/slo/_index.md | 6 +- docs/content/en/docs/install/k8s.md | 32 +++++ docs/content/en/docs/yaml-crd-ref/analysis.md | 11 +- .../docs/yaml-crd-ref/analysisdefinition.md | 122 ++++++++++++------ .../yaml-crd-ref/analysisvaluetemplate.md | 7 +- 5 files changed, 131 insertions(+), 47 deletions(-) diff --git a/docs/content/en/docs/implementing/slo/_index.md b/docs/content/en/docs/implementing/slo/_index.md index 12c821a5b3..b8867bec6d 100644 --- a/docs/content/en/docs/implementing/slo/_index.md +++ b/docs/content/en/docs/implementing/slo/_index.md @@ -44,7 +44,7 @@ and can be displayed on dashboard tools, such as Grafana. A Keptn Analysis is implemented with three resources: -* [AnalysisValueTemplate](../../crd-ref/metrics/v1alpha3/#analysisvaluetemplate) -- +* [AnalysisValueTemplate](../../yaml-crd-ref/analysisvaluetemplate.md) defines the SLI with the `KeptnMetricsProvider` (data source) and the query to perform for each SLI @@ -57,7 +57,7 @@ A Keptn Analysis is implemented with three resources: resource for each instance of each data provider you are using. The template refers to that provider and queries it. -* [AnalysisDefinition](../../crd-ref/metrics/v1alpha3/#analysisdefinition) -- +* [AnalysisDefinition](../../yaml-crd-ref/analysisdefinition.md) define the list of SLOs for an `Analysis` An `AnalysisDefinition` resource contains a list of objectives to satisfy. @@ -71,7 +71,7 @@ A Keptn Analysis is implemented with three resources: defining the data provider from which to gather the data and how to compute the Analysis -* [Analysis](../../crd-ref/metrics/v1alpha3/#analysis) -- +* [Analysis](../../yaml-crd-ref/analysis.md) define the specific configurations and the Analysis to report. An `Analysis` resource customizes the templates diff --git a/docs/content/en/docs/install/k8s.md b/docs/content/en/docs/install/k8s.md index cc21cf37eb..64fe3899f2 100644 --- a/docs/content/en/docs/install/k8s.md +++ b/docs/content/en/docs/install/k8s.md @@ -132,6 +132,38 @@ Some considerations for Keptn: So you can create `KeptnMetrics` in a centralized namespace (such as `keptn-lifecycle-toolkit`) and access those metrics in evaluations on all namespaces in the cluster. +* The resources used for analyses + ([Analysis](../yaml-crd-ref/analysis.md), + [AnalysisDefinition](../yaml-crd-ref/analysisdefinition.md), + and + [AnalysisValueTemplate](../yaml-crd-ref/analysisvaluetemplate.md)) + each support an optional `namespace` field. + The `Analysis` resource references the `AnalysisDefinition` resource, + which then references the `AnalysisValueTemplate` resource. + + - If the `namespace` is not set explicitly, + the `AnalysisDefinition` and `AnalysisValueTemplate` resources + must reside in the same namespace as the `Analysis` resource. + In this case, analyses resources of the same name + can reside in different namespaces without impacting each other. + - If the `namespace` field is set for the resources, + the `Analysis`, `AnalysisDefinition`, and `AnalysisValueTemplate` resources + can each reside in different namespaces. + In this case, each analysis resource must have a name + that is unique for the cluster. + + This provides configuration options such as the following: + + - You can have one namespace + with all of your `AnalysisDefinitions` and `AnalysisValueTemplates` resources + and reuse them in the different namespaces where you run the analyses. + + - You can have everything strictly namespaced + and always put the `AnalysisDefinitions`, `ValueTemplates` + and the `Analysis` resources into the same namespace, + without adding the explicit namespace selectors + when creating references between those objects. + * Each `KeptnApp` resource identifies the namespace to which it belongs. If you configure multiple namespaces, you can have `KeptnApp` resources with the same name diff --git a/docs/content/en/docs/yaml-crd-ref/analysis.md b/docs/content/en/docs/yaml-crd-ref/analysis.md index 8ac752ea96..06502734e4 100644 --- a/docs/content/en/docs/yaml-crd-ref/analysis.md +++ b/docs/content/en/docs/yaml-crd-ref/analysis.md @@ -64,10 +64,15 @@ status: * **analysisDefinition** -- Identify the `AnalysisDefinition` resource that stores the `AnalysisValuesTemplate` associated with this `Analysis` * **name** -- Name of the `AnalysisDefinition` resource - * **namespace** -- Namespace of the `AnalysisDefinition` resource. + * **namespace** (optional) -- + Namespace of the `AnalysisDefinition` resource. + The `AnalysisDefinition` resource can be located in any namespace. + If the namespace is not specified, + the analysis controller looks for the `AnalysisDefinition` resource + in the same namespace as the `Analysis` resource. * **status** -- results of this Analysis run, - added to the resource by Keptn. - * **pass** -- Whether the analysis passed or failed. + added to the resource by Keptn, + based on criteria defined in the `AnalysisDefinition` resource. * **warning** -- Whether the analysis returned a warning. * **raw** -- String-encoded JSON object that reaports the results diff --git a/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md b/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md index cdfb74ddff..72a882c7ee 100644 --- a/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md +++ b/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md @@ -13,23 +13,22 @@ list of Service Level Objectives (SLOs) for an `Analysis`. apiVersion: metrics.keptn.sh/v1alpha3 kind: AnalysisDefinition metadata: - name: ed-my-proj-dev-svc1 - namespace: keptn-lifecycle-toolkit-system + name: + namespace: spec: objectives: - analysisValueTemplateRef: - name: response-time-p95 - namespace: keptn-lifecycle-toolkit-system + name: + namespace: target: - failure: - lessThan: - fixedValue: 600 - warning: - inRange: - lowBound: 300 - highBound: 500 - weight: 1 - keyObjective: false + failure | warning: + : + : | + : + lowbound: + highBound: + weight: + keyObjective: totalScore: passPercentage: 90 warningPercentage: 75 @@ -41,28 +40,68 @@ spec: * **kind** -- Resource type. Must be set to AnalysisDefinition. * **metadata** - * **name** ed-my-proj-dev-svc1 - * **namespace** keptn-lifecycle-toolkit-system + * **name** -- Unique name of this analysis definition. + Names must comply with the + [Kubernetes Object Names and IDs](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names) + specification. + * **namespace** -- Namespace where this resource is located. + `Analysis` resources must specify this namespace + when referencing this definition, + unless it resides in the same namespace as the `Analysis` resource. * **spec** * **objectives** - * **analysisValueTemplateRef** - * **name** response-time-p95 - * **namespace** keptn-lifecycle-toolkit-system - * **target** - * **failure** - * **lessThan** - * **fixedValue** 600 + This is a list of objectives whose results are combined + to determine whether the analysis fails, passes, or passes with a warning. + * **analysisValueTemplateRef** -- + This string marks the beginning of each objective + * **name** -- The `metadata.name` value of the + [AnalysisDefinition](analysisdefinition.md) + resource used for this objective. + That resource defines the data provider and the query to use. + * **namespace** (optional) -- + Namespace of the `analysisValueTemplateRef` resource. + If the namespace is not specified, + the analysis controller looks for the `AnalysisValueTemplateRef` resource + in the same namespace as the `Analysis` resource. + * **target** -- defines failure or, optionally, warning criteria. + Values not specified for failure or warning result in a pass. + Keptn writes the results of the analysis to the `status` section + of the + [Analysis](analysis.md) + resource after the analysis runs. + * **failure** -- criteria for failure, specified as + `operator: `. + This can be specified either as an absolute value + or as a range of values. + + Valid operators for absolute values are: + * `lessThan` -- `<` operator + * `lessThanOrEqual` -- `<=` operator + * `greaterThan` -- `>` operator + * `greaterThanOrEqual` -- `>=` operator + * `equalTo` -- `==` operator + + Valid operators for specifying ranges are: + * `inRange` -- value is inclusively in the defined range + * `notInRange` -- value is exclusivly out of the defined range + + Each of these operators require two operators: + + * `lowBound` -- minimum value of the range included or excluded + * `highBound` -- maximum value of the range included or excluded - * **warning** - * **inRange** - * **lowBound** 300 - * **highBound** 500 - * **weight** 1 - * **keyObjective** false + * **warning** (optional) -- criteria for a warning, + specified in the same way as the `failure` field. + * **weight** (optional) -- used to emphasize the importance + of one `objective` over others + * **keyObjective** (optional) -- If set to `true`, + the entire analysis fails if this objective fails * **totalScore** - * **passPercentage** 90 + * **passPercentage** -- threshhold to reach for the full analysis + (all objectives) to pass - * **warningPercentage** + * **warningPercentage** (optional) -- threshhold to reach + for the full analysis (all objectives) to pass with `warning` status ## Usage @@ -92,17 +131,22 @@ spec: namespace: keptn-lifecycle-toolkit-system target: failure: - lessThan: - fixedValue: 600 + : + fixedValue: integer> | + inRange: | notInRange: + lowBound: + highBound: warning: - inRange: - lowBound: 300 - highBound: 500 - weight: 1 - keyObjective: false + : + fixedValue: integer> | + inRange: | notInRange: + lowBound: + highBound: + weight: + keyObjective: totalScore: - passPercentage: 90 - warningPercentage: 75 + passPercentage: + warningPercentage: ``` For an example of how to implement the Keptn Analysis feature, see the diff --git a/docs/content/en/docs/yaml-crd-ref/analysisvaluetemplate.md b/docs/content/en/docs/yaml-crd-ref/analysisvaluetemplate.md index 696398dc86..ca91cea2b2 100644 --- a/docs/content/en/docs/yaml-crd-ref/analysisvaluetemplate.md +++ b/docs/content/en/docs/yaml-crd-ref/analysisvaluetemplate.md @@ -18,7 +18,7 @@ apiVersion: metrics.keptn.sh/v1alpha3 kind: AnalysisValueTemplate metadata: name: response-time-p95 - namespace: keptn-lifecycle-toolkit-system + namespace: spec: provider: name: prometheus | dynatrace | dql | datadog @@ -46,7 +46,10 @@ spec: Names must comply with the [Kubernetes Object Names and IDs](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names) specification. - * **namespace** -- Namespace where this template lives + * **namespace** (optional) -- Namespace where this template lives. + `Analysis` resources must specify this namespace + when referencing this definition, + unless it resides in the same namespace as the `Analysis` resource. * **spec** * **provider** * **name** -- The `spec.name` value of the From 015cdcb521b3ef1f5390adcf26b55952571efaf3 Mon Sep 17 00:00:00 2001 From: Meg McRoberts Date: Mon, 30 Oct 2023 03:40:35 -0700 Subject: [PATCH 02/13] markdownlint-fix Signed-off-by: Meg McRoberts --- docs/content/en/docs/install/k8s.md | 8 ++++---- .../en/docs/yaml-crd-ref/analysisdefinition.md | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/content/en/docs/install/k8s.md b/docs/content/en/docs/install/k8s.md index 64fe3899f2..f37cb7f83a 100644 --- a/docs/content/en/docs/install/k8s.md +++ b/docs/content/en/docs/install/k8s.md @@ -141,12 +141,12 @@ Some considerations for Keptn: The `Analysis` resource references the `AnalysisDefinition` resource, which then references the `AnalysisValueTemplate` resource. - - If the `namespace` is not set explicitly, + * If the `namespace` is not set explicitly, the `AnalysisDefinition` and `AnalysisValueTemplate` resources must reside in the same namespace as the `Analysis` resource. In this case, analyses resources of the same name can reside in different namespaces without impacting each other. - - If the `namespace` field is set for the resources, + * If the `namespace` field is set for the resources, the `Analysis`, `AnalysisDefinition`, and `AnalysisValueTemplate` resources can each reside in different namespaces. In this case, each analysis resource must have a name @@ -154,11 +154,11 @@ Some considerations for Keptn: This provides configuration options such as the following: - - You can have one namespace + * You can have one namespace with all of your `AnalysisDefinitions` and `AnalysisValueTemplates` resources and reuse them in the different namespaces where you run the analyses. - - You can have everything strictly namespaced + * You can have everything strictly namespaced and always put the `AnalysisDefinitions`, `ValueTemplates` and the `Analysis` resources into the same namespace, without adding the explicit namespace selectors diff --git a/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md b/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md index 72a882c7ee..1339ed9845 100644 --- a/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md +++ b/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md @@ -58,7 +58,7 @@ spec: [AnalysisDefinition](analysisdefinition.md) resource used for this objective. That resource defines the data provider and the query to use. - * **namespace** (optional) -- + * **namespace** (optional) -- Namespace of the `analysisValueTemplateRef` resource. If the namespace is not specified, the analysis controller looks for the `AnalysisValueTemplateRef` resource @@ -75,15 +75,15 @@ spec: or as a range of values. Valid operators for absolute values are: - * `lessThan` -- `<` operator - * `lessThanOrEqual` -- `<=` operator - * `greaterThan` -- `>` operator - * `greaterThanOrEqual` -- `>=` operator - * `equalTo` -- `==` operator + * `lessThan` -- `<` operator + * `lessThanOrEqual` -- `<=` operator + * `greaterThan` -- `>` operator + * `greaterThanOrEqual` -- `>=` operator + * `equalTo` -- `==` operator Valid operators for specifying ranges are: - * `inRange` -- value is inclusively in the defined range - * `notInRange` -- value is exclusivly out of the defined range + * `inRange` -- value is inclusively in the defined range + * `notInRange` -- value is exclusivly out of the defined range Each of these operators require two operators: From 97f3e7bbda71bd4f2b22579487122aed3c27b62e Mon Sep 17 00:00:00 2001 From: Meg McRoberts Date: Mon, 30 Oct 2023 03:43:12 -0700 Subject: [PATCH 03/13] fix indentation error Signed-off-by: Meg McRoberts --- docs/content/en/docs/yaml-crd-ref/analysisdefinition.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md b/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md index 1339ed9845..8afbf72d0a 100644 --- a/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md +++ b/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md @@ -85,10 +85,10 @@ spec: * `inRange` -- value is inclusively in the defined range * `notInRange` -- value is exclusivly out of the defined range - Each of these operators require two operators: + Each of these operators require two arguments: - * `lowBound` -- minimum value of the range included or excluded - * `highBound` -- maximum value of the range included or excluded + * `lowBound` -- minimum value of the range included or excluded + * `highBound` -- maximum value of the range included or excluded * **warning** (optional) -- criteria for a warning, specified in the same way as the `failure` field. From 48f8c782c377afc1ef6fdb533042026a70486eab Mon Sep 17 00:00:00 2001 From: Meg McRoberts Date: Mon, 30 Oct 2023 03:47:48 -0700 Subject: [PATCH 04/13] more indent Signed-off-by: Meg McRoberts --- docs/content/en/docs/yaml-crd-ref/analysisdefinition.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md b/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md index 8afbf72d0a..cae3a42f73 100644 --- a/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md +++ b/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md @@ -87,8 +87,8 @@ spec: Each of these operators require two arguments: - * `lowBound` -- minimum value of the range included or excluded - * `highBound` -- maximum value of the range included or excluded + * `lowBound` -- minimum value of the range included or excluded + * `highBound` -- maximum value of the range included or excluded * **warning** (optional) -- criteria for a warning, specified in the same way as the `failure` field. From ae4fbeddcab0f41db0f2de5b7da62c63748fb528 Mon Sep 17 00:00:00 2001 From: Meg McRoberts Date: Mon, 30 Oct 2023 04:04:51 -0700 Subject: [PATCH 05/13] one more time Signed-off-by: Meg McRoberts --- .../content/en/docs/yaml-crd-ref/analysisdefinition.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md b/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md index cae3a42f73..1ebaca6399 100644 --- a/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md +++ b/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md @@ -38,7 +38,7 @@ spec: * **apiVersion** -- API version being used * **kind** -- Resource type. - Must be set to AnalysisDefinition. + Must be set to `AnalysisDefinition`. * **metadata** * **name** -- Unique name of this analysis definition. Names must comply with the @@ -83,12 +83,12 @@ spec: Valid operators for specifying ranges are: * `inRange` -- value is inclusively in the defined range - * `notInRange` -- value is exclusivly out of the defined range + * `notInRange` -- value is exclusively out of the defined range - Each of these operators require two arguments: + Each of these operators require two arguments: - * `lowBound` -- minimum value of the range included or excluded - * `highBound` -- maximum value of the range included or excluded + * `lowBound` -- minimum value of the range included or excluded + * `highBound` -- maximum value of the range included or excluded * **warning** (optional) -- criteria for a warning, specified in the same way as the `failure` field. From 77526b5d7a3254bb79455cfd988e997b52e365b7 Mon Sep 17 00:00:00 2001 From: realanna Date: Tue, 31 Oct 2023 14:26:19 +0100 Subject: [PATCH 06/13] chore: add analysis and template required Signed-off-by: realanna --- docs/content/en/docs/yaml-crd-ref/analysis.md | 4 ++-- docs/content/en/docs/yaml-crd-ref/analysisvaluetemplate.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/content/en/docs/yaml-crd-ref/analysis.md b/docs/content/en/docs/yaml-crd-ref/analysis.md index 06502734e4..0fc713f931 100644 --- a/docs/content/en/docs/yaml-crd-ref/analysis.md +++ b/docs/content/en/docs/yaml-crd-ref/analysis.md @@ -45,7 +45,7 @@ status: [Kubernetes Object Names and IDs](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names) specification. * **spec** - * **timeframe** -- Specifies the range for the corresponding query + * **timeframe** (required) -- Specifies the range for the corresponding query in the AnalysisValueTemplate. This can be populated as one of the following: @@ -61,7 +61,7 @@ status: If neither is set, the Analysis can not be added to the cluster. * **args** -- Map of key/value pairs that can be used to substitute variables in the `AnalysisValueTemplate` query. - * **analysisDefinition** -- Identify the `AnalysisDefinition` resource + * **analysisDefinition** (required) -- Identify the `AnalysisDefinition` resource that stores the `AnalysisValuesTemplate` associated with this `Analysis` * **name** -- Name of the `AnalysisDefinition` resource * **namespace** (optional) -- diff --git a/docs/content/en/docs/yaml-crd-ref/analysisvaluetemplate.md b/docs/content/en/docs/yaml-crd-ref/analysisvaluetemplate.md index ca91cea2b2..811c6ed1b0 100644 --- a/docs/content/en/docs/yaml-crd-ref/analysisvaluetemplate.md +++ b/docs/content/en/docs/yaml-crd-ref/analysisvaluetemplate.md @@ -51,7 +51,7 @@ spec: when referencing this definition, unless it resides in the same namespace as the `Analysis` resource. * **spec** - * **provider** + * **provider** (required) -- the KeptnMetricProvider * **name** -- The `spec.name` value of the [KeptnMetricsProvider](metricsprovider.md) resource to use. Note that each `AnalysisValueTemplate` resource @@ -59,7 +59,7 @@ spec: However, an `Analysis` resource can use multiple `AnalysisValueTemplate` resources, each of which uses a different data source. - * **query** -- query to be made. + * **query** (required) -- query to be made. This is done in the data provider's query language. It can include variables that use the go templating syntax to insert a placeholder in the query. From f6f1874d9ac9b865eb081f80b6db790a23305b9d Mon Sep 17 00:00:00 2001 From: realanna Date: Tue, 31 Oct 2023 14:33:00 +0100 Subject: [PATCH 07/13] chore: update analysis related required fields Signed-off-by: realanna --- .../en/docs/yaml-crd-ref/analysisdefinition.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md b/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md index 1ebaca6399..a6523dbfd8 100644 --- a/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md +++ b/docs/content/en/docs/yaml-crd-ref/analysisdefinition.md @@ -52,13 +52,13 @@ spec: * **objectives** This is a list of objectives whose results are combined to determine whether the analysis fails, passes, or passes with a warning. - * **analysisValueTemplateRef** -- + * **analysisValueTemplateRef** (required) -- This string marks the beginning of each objective - * **name** -- The `metadata.name` value of the + * **name** (required) -- The `metadata.name` value of the [AnalysisDefinition](analysisdefinition.md) resource used for this objective. That resource defines the data provider and the query to use. - * **namespace** (optional) -- + * **namespace** -- Namespace of the `analysisValueTemplateRef` resource. If the namespace is not specified, the analysis controller looks for the `AnalysisValueTemplateRef` resource @@ -90,17 +90,17 @@ spec: * `lowBound` -- minimum value of the range included or excluded * `highBound` -- maximum value of the range included or excluded - * **warning** (optional) -- criteria for a warning, + * **warning** -- criteria for a warning, specified in the same way as the `failure` field. - * **weight** (optional) -- used to emphasize the importance + * **weight** -- used to emphasize the importance of one `objective` over others - * **keyObjective** (optional) -- If set to `true`, + * **keyObjective** -- If set to `true`, the entire analysis fails if this objective fails - * **totalScore** + * **totalScore** (required) -- * **passPercentage** -- threshhold to reach for the full analysis (all objectives) to pass - * **warningPercentage** (optional) -- threshhold to reach + * **warningPercentage** -- threshhold to reach for the full analysis (all objectives) to pass with `warning` status ## Usage From 4a9f3185a5cb42bc658180e08e7b9d3d336124e6 Mon Sep 17 00:00:00 2001 From: realanna Date: Tue, 31 Oct 2023 14:42:49 +0100 Subject: [PATCH 08/13] chore: lint Signed-off-by: realanna --- docs/content/en/docs/yaml-crd-ref/analysisvaluetemplate.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/en/docs/yaml-crd-ref/analysisvaluetemplate.md b/docs/content/en/docs/yaml-crd-ref/analysisvaluetemplate.md index 811c6ed1b0..4c5d8fd557 100644 --- a/docs/content/en/docs/yaml-crd-ref/analysisvaluetemplate.md +++ b/docs/content/en/docs/yaml-crd-ref/analysisvaluetemplate.md @@ -51,7 +51,7 @@ spec: when referencing this definition, unless it resides in the same namespace as the `Analysis` resource. * **spec** - * **provider** (required) -- the KeptnMetricProvider + * **provider** (required) -- the KeptnMetricProvider * **name** -- The `spec.name` value of the [KeptnMetricsProvider](metricsprovider.md) resource to use. Note that each `AnalysisValueTemplate` resource From 146be3e360d9cd12d0e2cc914428a26b23eda13b Mon Sep 17 00:00:00 2001 From: RealAnna <89971034+RealAnna@users.noreply.github.com> Date: Tue, 31 Oct 2023 14:54:22 +0100 Subject: [PATCH 09/13] Apply suggestions from code review Co-authored-by: odubajDT <93584209+odubajDT@users.noreply.github.com> Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com> --- docs/content/en/docs/install/k8s.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/en/docs/install/k8s.md b/docs/content/en/docs/install/k8s.md index f37cb7f83a..ac989f2f6f 100644 --- a/docs/content/en/docs/install/k8s.md +++ b/docs/content/en/docs/install/k8s.md @@ -139,7 +139,7 @@ Some considerations for Keptn: [AnalysisValueTemplate](../yaml-crd-ref/analysisvaluetemplate.md)) each support an optional `namespace` field. The `Analysis` resource references the `AnalysisDefinition` resource, - which then references the `AnalysisValueTemplate` resource. + which then references the `AnalysisValueTemplate` resources. * If the `namespace` is not set explicitly, the `AnalysisDefinition` and `AnalysisValueTemplate` resources From a86d720bd9fcf2f7d9e20781b371448dc6ad30b9 Mon Sep 17 00:00:00 2001 From: Meg McRoberts Date: Tue, 31 Oct 2023 06:57:37 -0700 Subject: [PATCH 10/13] Update docs/content/en/docs/install/k8s.md Signed-off-by: Meg McRoberts meg.mcroberts@dynatrace.com Co-authored-by: RealAnna <89971034+RealAnna@users.noreply.github.com> Signed-off-by: Meg McRoberts --- docs/content/en/docs/install/k8s.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/en/docs/install/k8s.md b/docs/content/en/docs/install/k8s.md index ac989f2f6f..6475396016 100644 --- a/docs/content/en/docs/install/k8s.md +++ b/docs/content/en/docs/install/k8s.md @@ -132,7 +132,7 @@ Some considerations for Keptn: So you can create `KeptnMetrics` in a centralized namespace (such as `keptn-lifecycle-toolkit`) and access those metrics in evaluations on all namespaces in the cluster. -* The resources used for analyses +* The references to the resources used for analyses, ([Analysis](../yaml-crd-ref/analysis.md), [AnalysisDefinition](../yaml-crd-ref/analysisdefinition.md), and From 8a608e855659ca1dd044889b4e10aa206ee882c1 Mon Sep 17 00:00:00 2001 From: Meg McRoberts Date: Tue, 31 Oct 2023 06:57:54 -0700 Subject: [PATCH 11/13] Update docs/content/en/docs/install/k8s.md Signed-off-by: Meg McRoberts meg.mcroberts@dynatrace.com Co-authored-by: odubajDT <93584209+odubajDT@users.noreply.github.com> Signed-off-by: Meg McRoberts --- docs/content/en/docs/install/k8s.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/en/docs/install/k8s.md b/docs/content/en/docs/install/k8s.md index 6475396016..ed43128661 100644 --- a/docs/content/en/docs/install/k8s.md +++ b/docs/content/en/docs/install/k8s.md @@ -141,7 +141,7 @@ Some considerations for Keptn: The `Analysis` resource references the `AnalysisDefinition` resource, which then references the `AnalysisValueTemplate` resources. - * If the `namespace` is not set explicitly, + * If the `namespace` in the reference is not set explicitly, the `AnalysisDefinition` and `AnalysisValueTemplate` resources must reside in the same namespace as the `Analysis` resource. In this case, analyses resources of the same name From 9db4b6079447d94cdc6c8e86638450790a019ae2 Mon Sep 17 00:00:00 2001 From: Meg McRoberts Date: Tue, 31 Oct 2023 06:58:10 -0700 Subject: [PATCH 12/13] Update docs/content/en/docs/install/k8s.md Signed-off-by: Meg McRoberts meg.mcroberts@dynatrace.com Co-authored-by: odubajDT <93584209+odubajDT@users.noreply.github.com> Signed-off-by: Meg McRoberts --- docs/content/en/docs/install/k8s.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/en/docs/install/k8s.md b/docs/content/en/docs/install/k8s.md index ed43128661..f73735827b 100644 --- a/docs/content/en/docs/install/k8s.md +++ b/docs/content/en/docs/install/k8s.md @@ -146,7 +146,7 @@ Some considerations for Keptn: must reside in the same namespace as the `Analysis` resource. In this case, analyses resources of the same name can reside in different namespaces without impacting each other. - * If the `namespace` field is set for the resources, + * If the `namespace` in the reference is set for the resources, the `Analysis`, `AnalysisDefinition`, and `AnalysisValueTemplate` resources can each reside in different namespaces. In this case, each analysis resource must have a name From 6503e82e5777e0901e1c82ab2ba4d9825ba33de1 Mon Sep 17 00:00:00 2001 From: realanna Date: Tue, 31 Oct 2023 15:10:29 +0100 Subject: [PATCH 13/13] chore: fix analysis namespace Signed-off-by: realanna --- docs/content/en/docs/install/k8s.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/docs/content/en/docs/install/k8s.md b/docs/content/en/docs/install/k8s.md index f73735827b..33a294d96d 100644 --- a/docs/content/en/docs/install/k8s.md +++ b/docs/content/en/docs/install/k8s.md @@ -132,34 +132,30 @@ Some considerations for Keptn: So you can create `KeptnMetrics` in a centralized namespace (such as `keptn-lifecycle-toolkit`) and access those metrics in evaluations on all namespaces in the cluster. -* The references to the resources used for analyses, +* Analysis related resources ([Analysis](../yaml-crd-ref/analysis.md), [AnalysisDefinition](../yaml-crd-ref/analysisdefinition.md), and [AnalysisValueTemplate](../yaml-crd-ref/analysisvaluetemplate.md)) - each support an optional `namespace` field. + reference each other via a `name` and, optionally, a `namespace` field. The `Analysis` resource references the `AnalysisDefinition` resource, which then references the `AnalysisValueTemplate` resources. * If the `namespace` in the reference is not set explicitly, the `AnalysisDefinition` and `AnalysisValueTemplate` resources must reside in the same namespace as the `Analysis` resource. - In this case, analyses resources of the same name - can reside in different namespaces without impacting each other. * If the `namespace` in the reference is set for the resources, the `Analysis`, `AnalysisDefinition`, and `AnalysisValueTemplate` resources can each reside in different namespaces. - In this case, each analysis resource must have a name - that is unique for the cluster. This provides configuration options such as the following: * You can have one namespace - with all of your `AnalysisDefinitions` and `AnalysisValueTemplates` resources - and reuse them in the different namespaces where you run the analyses. + with all of your `AnalysisDefinition` and `AnalysisValueTemplate` resources + and reuse them in the different namespaces where you run analyses. * You can have everything strictly namespaced - and always put the `AnalysisDefinitions`, `ValueTemplates` + and always put the `AnalysisDefinition`, `AnalysisValueTemplate` and the `Analysis` resources into the same namespace, without adding the explicit namespace selectors when creating references between those objects.