-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update documentation for version v0.6.0
Signed-off-by: Keptn Sandbox Bot <[email protected]>
- Loading branch information
Keptn Sandbox Bot
committed
Feb 14, 2023
1 parent
f5c7ec6
commit 4f4f357
Showing
36 changed files
with
1,870 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: Docs | ||
linktitle: Docs | ||
description: Learn how to use Keptn. | ||
cascade: | ||
type: docs | ||
github_subdir: "docs/content/en/docs" | ||
path_base_for_github_subdir: "/content/en/docs-dev" | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Concepts | ||
description: Learn about underlying concepts of the keptn lifecycle toolkit. | ||
icon: concepts | ||
layout: quickstart | ||
weight: 50 | ||
hidechildren: true # this flag hides all sub-pages in the sidebar-multicard.html | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: Apps | ||
description: Learn what Keptn Apps are and how to use them | ||
icon: concepts | ||
layout: quickstart | ||
weight: 10 | ||
hidechildren: true # this flag hides all sub-pages in the sidebar-multicard.html | ||
--- | ||
|
||
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 | ||
that should be executed at app level: | ||
|
||
```yaml | ||
apiVersion: lifecycle.keptn.sh/v1alpha2 | ||
kind: KeptnApp | ||
metadata: | ||
name: podtato-head | ||
namespace: podtato-kubectl | ||
spec: | ||
version: "1.3" | ||
workloads: | ||
- name: podtato-head-left-arm | ||
version: 0.1.0 | ||
- name: podtato-head-left-leg | ||
version: 1.2.3 | ||
postDeploymentTasks: | ||
- post-deployment-hello | ||
preDeploymentEvaluations: | ||
- my-prometheus-definition | ||
``` | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: Architecture | ||
linktitle: Architecture | ||
description: Understand the details of how Keptn Lifecycle Toolkit works | ||
weight: 80 | ||
cascade: | ||
github_subdir: "docs/content/en/docs" | ||
path_base_for_github_subdir: "/content/en/docs-dev" | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: Evaluations | ||
description: Learn what Keptn Evaluations are and how to use them | ||
icon: concepts | ||
layout: quickstart | ||
weight: 10 | ||
hidechildren: true # this flag hides all sub-pages in the sidebar-multicard.html | ||
--- | ||
|
||
|
||
### Keptn Evaluation Definition | ||
|
||
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: | ||
|
||
```yaml | ||
apiVersion: lifecycle.keptn.sh/v1alpha2 | ||
kind: KeptnEvaluationDefinition | ||
metadata: | ||
name: my-prometheus-evaluation | ||
spec: | ||
source: prometheus | ||
objectives: | ||
- name: query-1 | ||
query: "xxxx" | ||
evaluationTarget: <20 | ||
- name: query-2 | ||
query: "yyyy" | ||
evaluationTarget: >4 | ||
``` | ||
### Keptn Evaluation Provider | ||
A `KeptnEvaluationProvider` 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: | ||
|
||
```yaml | ||
apiVersion: lifecycle.keptn.sh/v1alpha2 | ||
kind: KeptnEvaluationProvider | ||
metadata: | ||
name: prometheus | ||
spec: | ||
targetServer: "http://prometheus-k8s.monitoring.svc.cluster.local:9090" | ||
secretName: prometheusLoginCredentials | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
--- | ||
title: Metrics | ||
description: Learn what Keptn Metrics are and how to use them | ||
icon: concepts | ||
layout: quickstart | ||
weight: 10 | ||
hidechildren: true # this flag hides all sub-pages in the sidebar-multicard.html | ||
--- | ||
|
||
### Keptn Metric | ||
|
||
A `KeptnMetric` is a CRD representing a metric. The metric will be collected from the provider specified in the | ||
specs.provider.name field. The query is a string in the provider-specific query language, used to obtain a metric. | ||
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. Please note, there is a | ||
limitation that `KeptnMetric` resource needs to be created only in `keptn-lifecycle-toolkit-system` namespace. | ||
|
||
A `KeptnMetric` looks like the following: | ||
|
||
```yaml | ||
apiVersion: metrics.keptn.sh/v1alpha1 | ||
kind: KeptnMetric | ||
metadata: | ||
name: keptnmetric-sample | ||
namespace: keptn-lifecycle-toolkit-system | ||
spec: | ||
provider: | ||
name: "<your-keptn-evaluation-provider-crd-name>" | ||
query: "sum(kube_pod_container_resource_limits{resource='cpu'})" | ||
fetchIntervalSeconds: 5 | ||
``` | ||
Keptn metrics can be exposed as OTel metrics via port `9999` of the KLT operator. To expose them, the env | ||
variable `EXPOSE_KEPTN_METRICS` in the operator manifest needs to be set to `true`. The default value of this variable | ||
is `true`. To access the metrics, use the following command: | ||
|
||
```shell | ||
kubectl port-forward deployment/klc-controller-manager 9999 -n keptn-lifecycle-toolkit-system | ||
``` | ||
|
||
and access the metrics via your browser with: | ||
|
||
```http://localhost:9999/metrics``` | ||
|
||
#### Accessing Metrics via the Kubernetes Custom Metrics API | ||
|
||
`KeptnMetrics` that are located in the `keptn-lifecycle-toolkit-system` namespace can also be retrieved via the | ||
Kubernetes Custom Metrics API. | ||
This makes it possible to refer to these metrics via the Kubernetes *HorizontalPodAutoscaler*, as in the following | ||
example: | ||
|
||
```yaml | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: podtato-head-entry | ||
namespace: podtato-kubectl | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: podtato-head-entry | ||
minReplicas: 1 | ||
maxReplicas: 10 | ||
metrics: | ||
- type: Object | ||
object: | ||
metric: | ||
name: keptnmetric-sample | ||
describedObject: | ||
apiVersion: metrics.keptn.sh/v1alpha1 | ||
kind: KeptnMetric | ||
name: keptnmetric-sample | ||
target: | ||
type: Value | ||
value: "10" | ||
``` | ||
|
||
You can also use the `kubectl raw` command to retrieve the values of a `KeptnMetric`, as in the following example: | ||
|
||
```shell | ||
$ kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta2/namespaces/podtato-kubectl/keptnmetrics.metrics.sh/keptnmetric-sample/keptnmetric-sample" | jq . | ||
{ | ||
"kind": "MetricValueList", | ||
"apiVersion": "custom.metrics.k8s.io/v1beta2", | ||
"metadata": {}, | ||
"items": [ | ||
{ | ||
"describedObject": { | ||
"kind": "KeptnMetric", | ||
"namespace": "keptn-lifecycle-toolkit-system", | ||
"name": "keptnmetric-sample", | ||
"apiVersion": "metrics.keptn.sh/v1alpha1" | ||
}, | ||
"metric": { | ||
"name": "keptnmetric-sample", | ||
"selector": { | ||
"matchLabels": { | ||
"app": "frontend" | ||
} | ||
} | ||
}, | ||
"timestamp": "2023-01-25T09:26:15Z", | ||
"value": "10" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
You can also filter based on matching labels. So to e.g. retrieve all metrics that are labelled with `app=frontend`, you | ||
can use the following command: | ||
|
||
```shell | ||
$ kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta2/namespaces/podtato-kubectl/keptnmetrics.metrics.sh/*/*?labelSelector=app%3Dfrontend" | jq . | ||
{ | ||
"kind": "MetricValueList", | ||
"apiVersion": "custom.metrics.k8s.io/v1beta2", | ||
"metadata": {}, | ||
"items": [ | ||
{ | ||
"describedObject": { | ||
"kind": "KeptnMetric", | ||
"namespace": "keptn-lifecycle-toolkit-system", | ||
"name": "keptnmetric-sample", | ||
"apiVersion": "metrics.keptn.sh/v1alpha1" | ||
}, | ||
"metric": { | ||
"name": "keptnmetric-sample", | ||
"selector": { | ||
"matchLabels": { | ||
"app": "frontend" | ||
} | ||
} | ||
}, | ||
"timestamp": "2023-01-25T09:26:15Z", | ||
"value": "10" | ||
} | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: Overview | ||
icon: concepts | ||
layout: quickstart | ||
weight: 5 | ||
hidechildren: true # this flag hides all sub-pages in the sidebar-multicard.html | ||
--- |
7 changes: 7 additions & 0 deletions
7
content/en/docs-v0.6.0/concepts/overview/how-it-works/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: How it works | ||
icon: concepts | ||
layout: quickstart | ||
weight: 5 | ||
hidechildren: true # this flag hides all sub-pages in the sidebar-multicard.html | ||
--- |
24 changes: 24 additions & 0 deletions
24
content/en/docs-v0.6.0/concepts/overview/klc-cert-manager/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: Keptn Certificate Manager | ||
icon: concepts | ||
layout: quickstart | ||
weight: 5 | ||
hidechildren: true # this flag hides all sub-pages in the sidebar-multicard.html | ||
--- | ||
|
||
### Keptn Cert Manager | ||
|
||
The Lifecycle Toolkit includes a Mutating Webhook which requires TLS certificates to be mounted as a volume in its pod. | ||
In version 0.6.0 and later, the certificate creation | ||
is handled automatically by | ||
the [klt-cert-manager](https://github.com/keptn/lifecycle-toolkit/blob/main/klt-cert-manager/README.md). | ||
|
||
The certificate is created as a secret in the `keptn-lifecycle-toolkit-system` namespace with a renewal threshold of 12 | ||
hours. | ||
If it expires, the [klt-cert-manager](https://github.com/keptn/lifecycle-toolkit/blob/main/klt-cert-manager/README.md) | ||
renews it. | ||
The Lifecycle Toolkit operator waits for a valid certificate to be ready. | ||
The certificate is mounted on an empty dir volume in the operator. | ||
|
||
When a certificate is left over from an older version, the webhook or the operator may generate errors because of an | ||
invalid certificate. To solve this, delete the certificate and restart the operator. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: Phases | ||
icon: concepts | ||
layout: quickstart | ||
weight: 10 | ||
hidechildren: true # this flag hides all sub-pages in the sidebar-multicard.html | ||
--- |
Oops, something went wrong.