Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: improve how-to and ref info about integrating KLT with apps #1785

Closed
wants to merge 39 commits into from
Closed
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
90dc692
docs: architecture of KeptnApps and KeptnWorkloads
StackScribe Jul 26, 2023
3cc4e25
markdownlint-fix
StackScribe Jul 27, 2023
9ab806a
fix markdownlint issues
StackScribe Jul 27, 2023
96fb64b
annotations vs labels
StackScribe Jul 27, 2023
1dde7b6
edits
StackScribe Jul 28, 2023
0119749
Update docs/content/en/docs/concepts/architecture/keptn-apps/_index.md
StackScribe Jul 31, 2023
74bfb99
Update docs/content/en/docs/concepts/architecture/keptn-apps/_index.md
StackScribe Jul 31, 2023
faf5301
Update docs/content/en/docs/concepts/architecture/keptn-apps/_index.md
StackScribe Jul 31, 2023
e9f5f9b
Update docs/content/en/docs/concepts/architecture/keptn-apps/_index.md
StackScribe Jul 31, 2023
7db8b16
Update docs/content/en/docs/install/_index.md
StackScribe Jul 31, 2023
c13f9ea
clarify KeptnApp annotations
StackScribe Jul 31, 2023
50fd076
KeptnWorkload xrefs
StackScribe Jul 31, 2023
356356a
markdownlint errors
StackScribe Aug 1, 2023
2a1110d
bogus commit to force rerun
StackScribe Aug 1, 2023
1066712
more markdownlint
StackScribe Aug 1, 2023
d4885d1
Update docs/content/en/docs/implementing/integrate/_index.md
StackScribe Aug 2, 2023
521cb3b
Update docs/content/en/docs/implementing/integrate/_index.md
StackScribe Aug 2, 2023
2ae0f65
Update docs/content/en/docs/implementing/integrate/_index.md
StackScribe Aug 2, 2023
6d07040
Update docs/content/en/docs/implementing/integrate/_index.md
StackScribe Aug 2, 2023
df0f9eb
Update docs/content/en/docs/implementing/integrate/_index.md
StackScribe Aug 2, 2023
10ed806
Update docs/content/en/docs/implementing/integrate/_index.md
StackScribe Aug 2, 2023
e0d9272
Update docs/content/en/docs/implementing/integrate/_index.md
StackScribe Aug 2, 2023
9966b19
Update docs/content/en/docs/implementing/integrate/_index.md
StackScribe Aug 2, 2023
1d37a07
Merge branch 'main' into 0719-arch-app
RealAnna Aug 3, 2023
991de38
Update docs/content/en/docs/concepts/architecture/keptn-apps/_index.md
StackScribe Aug 4, 2023
c86ab93
Anna comments
StackScribe Aug 7, 2023
4c9c035
updated API ref
StackScribe Aug 8, 2023
65b6709
Merge branch 'main' into 0719-arch-app
StackScribe Aug 8, 2023
71f420e
chore: move from continuous helmify to custom chart (#1840)
geoffrey1330 Aug 8, 2023
ca98c09
chore: remove helm chart generation from CI (#1856)
odubajDT Aug 8, 2023
512a8ca
feat(metrics-operator): add AnalysisDefinition CRD (#1823)
odubajDT Aug 8, 2023
200253e
feat(metrics-operator): add Analysis CRD (#1839)
RealAnna Aug 9, 2023
fd27c4b
docs: architecture of KeptnApps and KeptnWorkloads
StackScribe Jul 26, 2023
474c8dd
edits
StackScribe Jul 28, 2023
c67e50f
markdownlint-fix
StackScribe Aug 9, 2023
85d827c
xrefs after rebase
StackScribe Aug 9, 2023
62d0598
regenerate docs
StackScribe Aug 9, 2023
10715f5
more xref
StackScribe Aug 9, 2023
df96edd
another xref
StackScribe Aug 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions docs/content/en/docs/concepts/architecture/keptn-apps/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
title: KeptnApp and KeptnWorkload resources
linktitle: Keptn Applications and Keptn Workloads
description: How Keptn applications work
weight: 50
cascade:
---

## Keptn Workloads

A
[KeptnWorkload](../../../crd-ref/lifecycle/v1alpha3/#keptnworkload)
resource augments a Kubernetes
[Workload](https://kubernetes.io/docs/concepts/workloads/)
with the ability to handle extra phases.
It can execute the pre- and post-deployment evaluations of a Workload
and run pre- and post-deployment tasks.

In its state, it tracks the currently active `Workload Instances`,
(`Pod`, `DaemonSet`, `StatefulSet`, and `ReplicaSet` resources),
as well as the overall state of the Pre Deployment phase,
which the scheduler can use to determine
whether the pods belonging to a workload
should be created and assigned to a node.
When it detects that the referenced object has reached its desired state
(e.g. all pods of a deployment are up and running),
it knows that a`PostDeploymentCheck` can be triggered.

The `KeptnWorkload` resources are created automatically
and without delay by the mutating webhook
as soon as the workload manifest is applied.

## Keptn Applications

A [KeptnApp](../../../yaml-crd-ref/app.md)
resource combines multiple Kubernetes
[workloads](https://kubernetes.io/docs/concepts/workloads/)
into a single entity
that represent the application that is published.
Note that the Kubernetes documentation
often refers to workloads as applications,
but each workload actually corresponds to one version
of one deployable microservice,
not the amalgamation of multiple microservices
StackScribe marked this conversation as resolved.
Show resolved Hide resolved
that typically comprise the released software.

Implementing Keptn applications provides the following benefits:

* Observability tools report on the deployment
of all workloads together rather than individually.
* You can define pre-deployment evaluations and tasks
that must all complete successfully
before the scheduler creates the pods for any of the workloads.
* You can define post-deployment evaluations and tasks
that run only after all the workloads have completed successfully.

You control the content of a `KeptnApp` resource
with annotations or labels that are applied to each
[Workload](https://kubernetes.io/docs/concepts/workloads/)
([Deployments](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/),
[StatefulSets](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/),
and
[DaemonSets](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/):

* The annotations described in
[Basic annotations](../../../implementing/integrate/#basic-annotations)
are used to automatically generate `KeptnApp` resources
that contain the identifications required
to run the KLT observability features.
* You must manually add the annotations described in
[Pre- and post-deployment checks](../../../implementing/integrate/#pre--and-post-deployment-checks)
to the basic `KeptnApp` manifest to define
the evaluations and tasks you want to run pre- and post-deployment.

By default, the `KeptnApp` resources are updated every 30 seconds
when any of the Workloads have been modified;
The timeout is provided because it may take some time
to apply all `KeptnWorkload` resources to the cluster.
This interval can be modified for the cluster by changing the value
of the `keptnAppCreationRequestTimeoutSeconds` field in the
[KeptnConfig](../../../yaml-crd-ref/config.md)
resource.
39 changes: 0 additions & 39 deletions docs/content/en/docs/concepts/workloads/_index.md

This file was deleted.

25 changes: 8 additions & 17 deletions docs/content/en/docs/getting-started/observability/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,14 @@ you need to do the following:
[Install and update](../../install)
to install and enable KLT on your cluster.
1. Follow the instructions in
[Integrate KLT with your applications](../../implementing/integrate)
to integrate KLT with your Kubernetes cluster.
This requires the following:

- Follow the instructions in
[Annotate workload](../../implementing/integrate/#basic-annotations)
to integrate the Lifecycle Toolkit into your Kubernetes cluster
by applying basic annotations
to your workload and pod resources.
- Follow the instructions in
[Define a Keptn application](../../implementing/integrate/#define-a-keptn-application)
to create a Keptn application that aggragates
all the `workloads` for your deployment into a single
[KeptnApp](../../yaml-crd-ref/app.md) resource.
For this exercise, we recommend that you use
[Keptn automatic app discovery](../../implementing/integrate/#use-keptn-automatic-app-discovery)
to automatically generate a Keptn Application.
[Basic annotations](../../implementing/integrate/#basic-annotations)
to integrate the Lifecycle Toolkit into your Kubernetes cluster
by applying basic annotations
to your workload and pod resources.
and to create appropriate
[KeptnApp](../../yaml-crd-ref/app.md)
resources that aggragate
all the `workloads` for a logical deployment into a single resource.

## DORA metrics

Expand Down
24 changes: 8 additions & 16 deletions docs/content/en/docs/getting-started/orchestrate/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,14 @@ you need to do the following:
[Install and update](../../install)
to install and enable KLT on your cluster.
1. Follow the instructions in
[Integrate KLT with your applications](../../implementing/integrate)
to integrate KLT with your Kubernetes cluster:

* Follow the instructions in
[Annotate workload](../../implementing/integrate/#basic-annotations)
to integrate the Lifecycle Toolkit into your Kubernetes cluster
by applying basic annotations to your `Deployment` resource.
* Follow the instructions in
[Define a Keptn application](../../implementing/integrate/#define-a-keptn-application)
to create a
[KeptnApp](../../yaml-crd-ref/app.md) resource
that includes all workloads on the cluster,
regardless of the tools being used.
For this exercise, we recommend that you
[Use Keptn automatic app discovery](../../implementing/integrate/#use-keptn-automatic-app-discovery)
to automatically generate a Keptn Application.
[Annotate workload](../../implementing/integrate/#basic-annotations)
to integrate the Lifecycle Toolkit into your Kubernetes cluster
by applying basic annotations to your `Deployment` resource.
This also creates appropriate
[KeptnApp](../../yaml-crd-ref/app.md) resources
that aggregates workloads that are combined
into the released product,
regardless of the tools being used.

## Define evaluations to be performed pre- and post-deployment

Expand Down
Loading