Skip to content

Commit

Permalink
Merge branch 'main' into release-please--branches--main--components--…
Browse files Browse the repository at this point in the history
…cert-manager

Signed-off-by: RealAnna <[email protected]>
  • Loading branch information
RealAnna authored Feb 6, 2024
2 parents ca2947a + e616292 commit b71dcc6
Show file tree
Hide file tree
Showing 43 changed files with 995 additions and 206 deletions.
1 change: 1 addition & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ envsubst
envtest
errorlint
Etco
euo
evaluatemetrics
evaluationdefinition
evaluationhandler
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/htmltest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
with:
path: |
tmp/.htmltest
key: htmltest-{{ hashFiles('tmp/.htmltest/refcache.json') }}
key: htmltest-${{ hashFiles('tmp/.htmltest/refcache.json') }}

- name: Check HTML
run: make htmltest
8 changes: 4 additions & 4 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ jobs:
working-directory: .
run: make chainsaw-integration-test-allowed-namespaces

# - name: (Chainsaw) Run Integration Tests
# if: inputs.allowed-namespaces == 'allowed_ns_off'
# working-directory: .
# run: make integration-test
- name: (Chainsaw) Run Integration Tests
if: inputs.allowed-namespaces == 'allowed_ns_off'
working-directory: .
run: make chainsaw-integration-test

- name: Create reports
if: failure()
Expand Down
4 changes: 2 additions & 2 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
".": "0.9.0",
"keptn-cert-manager": "2.0.0",
"runtimes/python-runtime": "1.0.1",
"runtimes/deno-runtime": "1.0.2",
"runtimes/python-runtime": "1.0.2",
"runtimes/deno-runtime": "2.0.0",
"lifecycle-operator": "0.8.3",
"scheduler": "0.8.3",
"metrics-operator": "0.9.0"
Expand Down
1 change: 1 addition & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
sonar.projectKey=keptn_lifecycle-toolkit
sonar.projectName=lifecycle-toolkit
sonar.exclusions=test/kuttl/**/*.yaml,\
test/chainsaw/**/*.yaml,\
docs/docs/**/*.yaml,\
test/prometheus/**/*.yaml,\
examples/**/*.yaml
Expand Down
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,22 @@ integration-test-allowed-namespaces-local: install-prometheus
# CHAINSAW #
############

.PHONY: chainsaw-integration-test #these tests should run on a real cluster!
chainsaw-integration-test:
kubectl apply -f ./lifecycle-operator/config/crd/bases
# chainsaw test --test-dir ./test/chainsaw/integration/
chainsaw test --test-dir ./test/chainsaw/testmetrics/
# chainsaw test --test-dir ./test/chainsaw/testanalysis/
chainsaw test --test-dir ./test/chainsaw/testcertificate/

.PHONY: chainsaw-integration-test-local #these tests should run on a real cluster!
chainsaw-integration-test-local:
kubectl apply -f ./lifecycle-operator/config/crd/bases
# chainsaw test --test-dir ./test/chainsaw/integration/ --config ./.chainsaw-local.yaml
chainsaw test --test-dir ./test/chainsaw/testmetrics/ --config ./.chainsaw-local.yaml
# chainsaw test --test-dir ./test/chainsaw/testanalysis/ --config ./.chainsaw-local.yaml
chainsaw test --test-dir ./test/chainsaw/testcertificate/ --config ./.chainsaw-local.yaml

.PHONY: chainsaw-integration-test-scheduling-gates #these tests should run on a real cluster!
chainsaw-integration-test-scheduling-gates:
chainsaw test --test-dir ./test/chainsaw/scheduling-gates/
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))

# renovate: datasource=docker depName=squidfunk/mkdocs-material
MKDOCS_DOCKER_IMAGE_VERSION=9.5.5
MKDOCS_DOCKER_IMAGE_VERSION=9.5.7
MKDOCS_DOCKER_IMAGE=squidfunk/mkdocs-material

INTERACTIVE:=$(shell [ -t 0 ] && echo 1)
Expand Down
109 changes: 49 additions & 60 deletions docs/docs/reference/crd-reference/analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ that are used in the `AnalysisDefinition` query.
apiVersion: metrics.keptn.sh/v1beta1
kind: Analysis
metadata:
name: analysis-sample
name: <name-of-analysis>
spec:
timeframe: from: <start-time> to: <end-time> | `recent <timespan>`
args:
Expand All @@ -35,52 +35,55 @@ status:
```
## Fields
<!-- markdownlint-disable MD007 -->
* **apiVersion** -- API version being used
* **kind** -- Resource type.
Must be set to `Analysis`
* **metadata**
* **name** -- Unique name of this analysis.
Names must comply with the
[Kubernetes Object Names and IDs](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names)
specification.
* **name** -- Unique name of this analysis.
Names must comply with the
[Kubernetes Object Names and IDs](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names)
specification.
* **spec**
* **timeframe** (required) -- Specifies the range for the corresponding query
in the AnalysisValueTemplate.
This can be populated as one of the following:

* A combination of ‘from’ and ’to’
to specify the start and stop times for the analysis.
These fields follow the
[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt)
timestamp format.
* Set the ‘recent’ property to a time span.
This causes the Analysis to use data going back that amount of time.
For example, if `recent: 10m` is set,
the Analysis studies data from the last ten minutes.
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** (required) -- Identify the `AnalysisDefinition` resource
that stores the `AnalysisValuesTemplate` associated with this `Analysis`
* **name** -- Name 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,
based on criteria defined in the `AnalysisDefinition` resource.
<!-- markdownlint-disable -->
* **warning** -- Whether the analysis returned a warning.
* **raw** -- String-encoded JSON object that reports the results
of evaluating one or more objectives or metrics.
See
[Interpreting Analysis results](#interpreting-analysis-results)
for details.
* **state** -- Set to `Completed` or `Progressing` as appropriate.
* **timeframe** (required) -- Specifies the range for the corresponding query
in the AnalysisValueTemplate.
This can be populated as one of the following:

* A combination of ‘from’ and ’to’
to specify the start and stop times for the analysis.
These fields follow the
[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt)
timestamp format.
* Set the ‘recent’ property to a time span.
This causes the Analysis to use data going back that amount of time.
For example, if `recent: 10m` is set,
the Analysis studies data from the last ten minutes.

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** (required) -- Identify the `AnalysisDefinition` resource
that stores the `AnalysisValuesTemplate` associated with this `Analysis`
* **name** -- Name 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,
based on criteria defined in the `AnalysisDefinition` resource.
> **Warning** -- Whether the analysis returned a warning.
* **raw** -- String-encoded JSON object that reports the results
of evaluating one or more objectives or metrics.
See
[Interpreting Analysis results](#interpreting-analysis-results)
for details.
* **state** -- Set to `Completed` or `Progressing` as appropriate.
<!-- markdownlint-enable MD007 -->

## Interpreting Analysis results

Expand Down Expand Up @@ -260,6 +263,7 @@ based on the objectives evaluated (totalScore: 2).
<!-- markdownlint-disable-next-line -->
**`warning`** -- Indicates whether any warnings have been issued
during the evaluation (false in this case).
<!-- markdownlint-enable MD007 -->

## Usage

Expand Down Expand Up @@ -332,25 +336,10 @@ API reference: [Analysis](../api-reference/metrics/v1beta1/index.md#analysis)

## Differences between versions

Keptn v0.8.3 and v0.9.0 include a preliminary release
of the Keptn Analysis feature
but it is hidden behind a feature flag.
To preview these features, do one of the following for your Keptn cluster:

* Set the environment variable `ENABLE_ANALYSIS` to `true`
in the `metrics-operator` deployment
* Add the following to your `helm upgrade` command line:

```shell
--set metricsOperator.env.enableKeptnAnalysis=true
```
* Set `enableKeptnAnalysis: "true"` in the
[keptn-metrics-operator/values.yaml](https://github.com/keptn/lifecycle-toolkit-charts/blob/main/charts/keptn-metrics-operator/values.yaml)
file

See
[Customizing the configuration of components](../../installation/index.md#customizing-the-configuration-of-components)
for more information.
The Keptn Analysis feature is an official part of Keptn v0.10.0 and later.
Keptn v0.8.3 included a preliminary release of this feature
but it was hidden behind a feature flag.
The behavior of this feature is unchanged since v0.8.3.

## See also

Expand Down
Loading

0 comments on commit b71dcc6

Please sign in to comment.