Skip to content

Commit

Permalink
Showing 20 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/keptnevaluationprovider_migrator.sh
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ do
kubectl get keptnevaluationproviders $n -oyaml >> $MANIFESTS_FILE
done

sed -i 's#lifecycle\.keptn\.sh/v1alpha2#metrics\.keptn\.sh/v1alpha2#g' $MANIFESTS_FILE
sed -i 's#lifecycle\.keptn\.sh/v1alpha2#metrics\.keptn\.sh/v1beta1#g' $MANIFESTS_FILE
sed -i 's/KeptnEvaluationProvider/KeptnMetricsProvider/g' $MANIFESTS_FILE

echo -e "------------------------------\n"
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ The steps in which the controller fetches metrics are given below:
in the `status` field of the `KeptnMetric` object.
* If the evaluation fails,
the error and reason is written to the
[KeptnMetricStatus](../../crd-ref/metrics/v1alpha3/#keptnmetricstatus)
[KeptnMetricStatus](../../crd-ref/metrics/v1beta1/#keptnmetricstatus)
resource.
The error is described in both human-readable language
and as raw data to help identify the source of the problem
6 changes: 3 additions & 3 deletions docs/content/en/docs/getting-started/metrics.md
Original file line number Diff line number Diff line change
@@ -159,7 +159,7 @@ The
file for our example looks like:

```yaml
apiVersion: metrics.keptn.sh/v1alpha2
apiVersion: metrics.keptn.sh/v1beta1
kind: Keptnmetric
metadata:
name: available-cpus
@@ -170,7 +170,7 @@ spec:
query: "sum(kube_node_status_capacity{resources`cpu`})"
fetchIntervalSeconds: 10
---
apiVersion: metrics.keptn.sh/v1alpha2
apiVersion: metrics.keptn.sh/v1beta1
kind: Keptnmetric
metadata:
name: availability-slo
@@ -257,7 +257,7 @@ $ kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta2/namespaces/simplenode-d
"kind": "KeptnMetric",
"namespace": "simplenode-dev",
"name": "available-cpus",
"apiVersion": "metrics.keptn.sh/v1alpha2"
"apiVersion": "metrics.keptn.sh/v1beta1"
},
"metric": {
"name": "available-cpus",
16 changes: 8 additions & 8 deletions docs/content/en/docs/implementing/evaluatemetrics.md
Original file line number Diff line number Diff line change
@@ -73,7 +73,7 @@ for a Prometheus data source that does not use a secret
could look like:

```yaml
apiVersion: metrics.keptn.sh/v1alpha2
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetricsProvider
metadata:
name: prometheus-provider
@@ -87,7 +87,7 @@ The `KeptnMetricProvider` resource for a Dynatrace provider
that uses a secret could look like:

```yaml
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetricsProvider
metadata:
name: dynatrace-provider
@@ -122,7 +122,7 @@ The
file for our example looks like:

```yaml
apiVersion: metrics.keptn.sh/v1alpha2
apiVersion: metrics.keptn.sh/v1beta1
kind: Keptnmetric
metadata:
name: available-cpus
@@ -133,7 +133,7 @@ spec:
query: "sum(kube_node_status_capacity{resources`cpu`})"
fetchIntervalSeconds: 10
---
apiVersion: metrics.keptn.sh/v1alpha2
apiVersion: metrics.keptn.sh/v1beta1
kind: Keptnmetric
metadata:
name: availability-slo
@@ -188,7 +188,7 @@ $ kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta2/namespaces/podtato-kube
"kind": "KeptnMetric",
"namespace": "podtato-kubectl",
"name": "keptnmetric-sample",
"apiVersion": "metrics.keptn.sh/v1alpha1"
"apiVersion": "metrics.keptn.sh/v1beta1"
},
"metric": {
"name": "keptnmetric-sample",
@@ -225,7 +225,7 @@ $ kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta2/namespaces/podtato-kube
"kind": "KeptnMetric",
"namespace": "keptn-lifecycle-toolkit-system",
"name": "keptnmetric-sample",
"apiVersion": "metrics.keptn.sh/v1alpha3"
"apiVersion": "metrics.keptn.sh/v1beta1"
},
"metric": {
"name": "keptnmetric-sample",
@@ -255,7 +255,7 @@ In other words, the span is
The default value is set to be `5m` if the `range.interval` is not set.

```yaml
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetric
metadata:
name: good-metric
@@ -295,7 +295,7 @@ spec:
metric:
name: keptnmetric-sample
describedObject:
apiVersion: metrics.keptn.sh/v1alpha1
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetric
name: keptnmetric-sample
target:
6 changes: 3 additions & 3 deletions docs/content/en/docs/implementing/slo.md
Original file line number Diff line number Diff line change
@@ -93,7 +93,7 @@ A Keptn Analysis is implemented with three resources:

Consider the following `Analysis` resource:

{{< embed path="/metrics-operator/config/samples/metrics_v1alpha3_analysis.yaml" >}}
{{< embed path="/metrics-operator/config/samples/metrics_v1beta1_analysis.yaml" >}}

This `Analysis` resource:

@@ -107,7 +107,7 @@ This `Analysis` resource:
The `AnalysisDefinition` resource references this `Analysis` resource
by its `name` and `namespace` and can be seen here:

{{< embed path="/metrics-operator/config/samples/metrics_v1alpha3_analysisdefinition.yaml" >}}
{{< embed path="/metrics-operator/config/samples/metrics_v1beta1_analysisdefinition.yaml" >}}

This simple definition contains a single objective, `response-time-p95`.
For this objective, both failure and warning criteria are defined:
@@ -123,7 +123,7 @@ this means that the analysis either passes with 100%
or fails with 0% (slower response time).

The objective points to the corresponding `AnalysisValueTemplate` resource:
{{< embed path="/metrics-operator/config/samples/metrics_v1alpha3_analysisvaluetemplate.yaml" >}}
{{< embed path="/metrics-operator/config/samples/metrics_v1beta1_analysisvaluetemplate.yaml" >}}

This template defines a query to a provider called `prometheus`:

6 changes: 3 additions & 3 deletions docs/content/en/docs/migrate/metrics-observe.md
Original file line number Diff line number Diff line change
@@ -240,7 +240,7 @@ The process is:
```yaml
apiVersion: v1
items:
- apiVersion: metrics.keptn.sh/v1alpha3
- apiVersion: metrics.keptn.sh/v1beta1
kind: Analysis
metadata:
creationTimestamp: "2023-09-14T11:00:01Z"
@@ -296,7 +296,7 @@ to insert a variable as a placeholder
for the service identifier in the prometheus query:

```yaml
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: AnalysisValueTemplate
metadata:
creationTimestamp: null
@@ -313,7 +313,7 @@ the name of the service can be passed to the analysis
using the `spec.args` property from the `Analysis` resource:

```yaml
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: Analysis
metadata:
name: analysis-sample-1
6 changes: 3 additions & 3 deletions docs/content/en/docs/yaml-crd-ref/analysis.md
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ that are used in the `AnalysisDefinition` query.
## Synopsis

```yaml
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: Analysis
metadata:
name: analysis-sample
@@ -309,7 +309,7 @@ kubectl get analysis - n keptn-lifecycle-poc -oyaml

## Examples

{{< embed path="/metrics-operator/config/samples/metrics_v1alpha3_analysis.yaml" >}}
{{< embed path="/metrics-operator/config/samples/metrics_v1beta1_analysis.yaml" >}}

This `Analysis` resource:

@@ -326,7 +326,7 @@ guide page.

## Files

API reference: [Analysis](../crd-ref/metrics/v1alpha3/#analysis)
API reference: [Analysis](../crd-ref/metrics/v1beta1/#analysis)

## Differences between versions

6 changes: 3 additions & 3 deletions docs/content/en/docs/yaml-crd-ref/analysisdefinition.md
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ list of Service Level Objectives (SLOs) for an `Analysis`.
## Synopsis

```yaml
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: AnalysisDefinition
metadata:
name: <name-of-this-resource>
@@ -119,7 +119,7 @@ Each of these objectives must specify:
## Example

```yaml
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: AnalysisDefinition
metadata:
name: ed-my-proj-dev-svc1
@@ -156,7 +156,7 @@ guide page.
## Files

API reference:
[AnalysisDefinition](../crd-ref/metrics/v1alpha3/#analysisdefinition)
[AnalysisDefinition](../crd-ref/metrics/v1beta1/#analysisdefinition)

## Differences between versions

6 changes: 3 additions & 3 deletions docs/content/en/docs/yaml-crd-ref/analysisvaluetemplate.md
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ of multiple types of data provider.
## Synopsis

```yaml
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: AnalysisValueTemplate
metadata:
name: response-time-p95
@@ -84,7 +84,7 @@ The template refers to that provider and queries it.

## Example

{{< embed path="/metrics-operator/config/samples/metrics_v1alpha3_analysisvaluetemplate.yaml" >}}
{{< embed path="/metrics-operator/config/samples/metrics_v1beta1_analysisvaluetemplate.yaml" >}}

For a full example of how the `AnalysisValueTemplate` is used
to implement the Keptn Analysis feature, see the
@@ -94,7 +94,7 @@ guide page.
## Files

API reference:
[AnalysisValueTemplate](../crd-ref/metrics/v1alpha3/#analysisvaluetemplate)
[AnalysisValueTemplate](../crd-ref/metrics/v1beta1/#analysisvaluetemplate)

## Differences between versions

4 changes: 2 additions & 2 deletions docs/content/en/docs/yaml-crd-ref/metric.md
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ for different metrics at the same time.
## Yaml Synopsis

```yaml
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetric
metadata:
name: <metric-name>
@@ -112,7 +112,7 @@ defined as `my-provider` in the `spec.provider.name` field
of the corresponding `KeptnMetricsProvider` CR.

```yaml
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetric
metadata:
name: keptnmetric-sample
4 changes: 2 additions & 2 deletions docs/content/en/docs/yaml-crd-ref/metricsprovider.md
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ for each metric definition by its name.
## Yaml Synopsis

```yaml
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetricsProvider
metadata:
name: <data-source-instance-name>
@@ -91,7 +91,7 @@ on all namespaces in the cluster.
### Example 1: Dynatrace data provider

```yaml
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetricsProvider
metadata:
name: dynatrace
2 changes: 1 addition & 1 deletion examples/sample-app/base/metric.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetric
metadata:
name: available-cpus
2 changes: 1 addition & 1 deletion examples/sample-app/base/provider.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetricsProvider
metadata:
name: my-provider
14 changes: 7 additions & 7 deletions examples/support/analysis/README.md
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ kubectl create namespace analysis-demo

```shell
cat <<EOF | kubectl apply -f -
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetricsProvider
metadata:
name: my-provider
@@ -55,7 +55,7 @@ First, we are going to create the template for the response time:

```shell
cat <<EOF | kubectl apply -f -
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: AnalysisValueTemplate
metadata:
name: response-time-p95
@@ -71,7 +71,7 @@ Our second metric will be the error rate, which we will retrieve with the follow

```shell
cat <<EOF | kubectl apply -f -
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: AnalysisValueTemplate
metadata:
name: error-rate
@@ -115,7 +115,7 @@ rather than from a real Prometheus instance:

```shell
cat <<EOF | kubectl apply -f -
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetricsProvider
metadata:
name: my-provider
@@ -133,7 +133,7 @@ This is done in an `AnalysisDefinition`, which can be applied using the followin

```shell
cat <<EOF | kubectl apply -f -
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: AnalysisDefinition
metadata:
name: my-analysis-definition
@@ -172,7 +172,7 @@ to perform an analysis for a specific timeframe:

```shell
cat <<EOF | kubectl apply -f -
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: Analysis
metadata:
name: analysis-sample
@@ -217,7 +217,7 @@ This will return something like the following, and includes the `status.raw` fie
breakdown on the result of each objective evaluation.

```yaml
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: Analysis
metadata:
name: analysis-sample
2 changes: 1 addition & 1 deletion examples/support/metrics/README.md
Original file line number Diff line number Diff line change
@@ -99,7 +99,7 @@ spec:
metric:
name: cpu-throttling
describedObject:
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetric
name: cpu-throttling
target:
2 changes: 1 addition & 1 deletion examples/support/metrics/hpa.yaml
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ spec:
metric:
name: cpu-throttling
describedObject:
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetric
name: cpu-throttling
target:
4 changes: 2 additions & 2 deletions examples/support/metrics/metric.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetricsProvider
metadata:
name: my-provider
@@ -7,7 +7,7 @@ spec:
type: prometheus
targetServer: "http://prometheus-k8s.monitoring.svc.cluster.local:9090"
---
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetric
metadata:
name: cpu-throttling
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetric
metadata:
name: available-cpus
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetric
metadata:
name: consumed-memory
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: metrics.keptn.sh/v1alpha3
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetricsProvider
metadata:
name: my-provider

0 comments on commit 57c548d

Please sign in to comment.