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: use v1 lifecycle API version in documentation #3355

Merged
merged 3 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ sonar.cpd.exclusions= **/*_test.go,\
lifecycle-operator/apis/lifecycle/v1alpha3/**/*.go,\
lifecycle-operator/apis/lifecycle/v1alpha4/**/*.go,\
lifecycle-operator/apis/lifecycle/v1beta1/**/*.go,\
lifecycle-operator/apis/lifecycle/v1/**/*.go,\
metrics-operator/api/v1alpha1/**/*.go,\
metrics-operator/api/v1alpha2/**/*.go,\
metrics-operator/api/v1alpha3/**/*.go,\
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/assets/crd/deno-context.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type: Opaque
data:
SECURE_DATA: dG9rZW46IG15dG9rZW4=
---
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: pre-deployment-hello
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/assets/crd/eval.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnEvaluationDefinition
metadata:
name: app-pre-deploy-eval-2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: scheduled-deployment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: slack-notification-dev
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: hello-keptn-http
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: hello-keptn-inline
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/assets/crd/python-configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: scheduled-deployment
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/assets/crd/python-context.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type: Opaque
data:
SECURE_DATA: dG9rZW46IG15dG9rZW4=
---
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: pre-deployment-hello
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/assets/crd/python-inline.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: scheduled-deployment-inline
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/assets/crd/python-libs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: python-inline
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/assets/crd/python-recursive.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: scheduled-deployment-2
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/assets/crd/task-definition.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: container-sleep
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnAppVersion
metadata:
name: podtato-head-0.1.0-6b86b273
Expand Down Expand Up @@ -29,7 +29,7 @@ status:
name: podtato-head-entry
version: 0.1.0
---
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnWorkloadVersion
metadata:
generation: 1
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/components/lifecycle-operator/keptn-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ comments: true
## Keptn Workloads

A
[KeptnWorkload](../../reference/api-reference/lifecycle/v1beta1/index.md#keptnworkload)
[KeptnWorkload](../../reference/api-reference/lifecycle/v1/index.md#keptnworkload)
resource augments a Kubernetes
[Workload](https://kubernetes.io/docs/concepts/workloads/)
with the ability to handle extra phases.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/getting-started/assets/keptnappcontext.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnAppContext
metadata:
name: keptndemoapp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTask
metadata:
name: runsendevent1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: send-event
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/getting-started/assets/promotion-task.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: promotion
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/assets/auto-app-discovery/keptnapp.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnApp
metadata:
name: podtato-head
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/assets/metadata/keptn-app-context.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnAppContext
metadata:
name: keptndemoapp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
app: podtato-head-frontend
type: ClusterIP
---
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnAppContext
metadata:
name: podtato-head
Expand All @@ -54,7 +54,7 @@ spec:
metadata:
commitID: {{.Values.commitID}}
---
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: post-deployment
Expand All @@ -65,7 +65,7 @@ spec:
code: |
console.log("deployment completed");
---
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: promote
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
app: podtato-head-frontend
type: ClusterIP
---
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnAppContext
metadata:
name: podtato-head
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/assets/otel/keptn-app-context-span.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnAppContext
metadata:
name: keptndemoapp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
annotations:
keptn.sh/lifecycle-toolkit: "enabled"
---
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnAppContext
metadata:
name: podtato-head
Expand All @@ -14,7 +14,7 @@ spec:
preDeploymentTasks:
- pre-deployment-check
---
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: pre-deployment-check
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: pre-deployment-check
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnApp
metadata:
name: podtato-head
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnApp
metadata:
name: podtato-head
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/assets/tasks/dummy-task.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: dummy-task
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/assets/tasks/multi-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: dummy-task
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/assets/tasks/slack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: slack-notification-dev
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/assets/tasks/taskdef-secure-data.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
name: deployment-hello
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/evaluations.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Note the following:
has no effect on whether other evaluations are completed.
- The results of each evaluation
are written to a
[KeptnEvaluation](../reference/api-reference/lifecycle/v1beta1/index.md#keptnevaluation)
[KeptnEvaluation](../reference/api-reference/lifecycle/v1/index.md#keptnevaluation)
resource.

## Annotate the workload resource for workload level evaluations
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/guides/integrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ To integrate Keptn with your workloads:
feature.

Keptn uses these annotations to the Kubernetes workloads to create the
[KeptnWorkload](../reference/api-reference/lifecycle/v1beta1/index.md#keptnworkload)
[KeptnWorkload](../reference/api-reference/lifecycle/v1/index.md#keptnworkload)
and
[KeptnApp](../reference/crd-reference/app.md)
resources that it uses to provide observability
Expand Down Expand Up @@ -66,7 +66,7 @@ resources in the namespaces where Keptn is enabled.
If Keptn finds any of these resources and the resource has either
the `keptn.sh` or the `kubernetes` annotations/labels,
it creates appropriate
[KeptnWorkload](../reference/api-reference/lifecycle/v1beta1/index.md#keptnworkload)
[KeptnWorkload](../reference/api-reference/lifecycle/v1/index.md#keptnworkload)
and
[KeptnApp](../reference/crd-reference/app.md)
resources for the version it detects.
Expand Down Expand Up @@ -94,7 +94,7 @@ These keys are defined as:

- `keptn.sh/workload` or `app.kubernetes.io/name`: Determines the name
of the generated
[KeptnWorkload](../reference/api-reference/lifecycle/v1beta1/index.md#keptnworkload)
[KeptnWorkload](../reference/api-reference/lifecycle/v1/index.md#keptnworkload)
resource.
- `keptn.sh/version` or `app.kubernetes.io/version`:
Determines the version of the `KeptnWorkload`
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ This way, after the re-deployment, the workload trace will contain the `stage=de
## Include metadata in application traces

Similar to the previous step, custom metadata can also be added to application traces via the
[KeptnAppContext](../reference/api-reference/lifecycle/v1beta1/index.md#keptnappcontext) CRD.
[KeptnAppContext](../reference/api-reference/lifecycle/v1/index.md#keptnappcontext) CRD.

`KeptnAppContext` is a custom resource definition in Keptn that allows you to add metadata
and links to traces for a specific application.
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/guides/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ resource defines one or more "executables"
that Keptn runs
as part of the pre- and post-deployment phases of a
[KeptnApp](../reference/crd-reference/app.md) or
[KeptnWorkload](../reference/api-reference/lifecycle/v1beta1/index.md#keptnworkload).
[KeptnWorkload](../reference/api-reference/lifecycle/v1/index.md#keptnworkload).

- pre-deployment (before the pod is scheduled)
- post-deployment (after the pod is scheduled)
Expand All @@ -22,7 +22,7 @@ These `KeptnTask` resources and the
are part of the Keptn Release Lifecycle Management.

A
[KeptnTask](../reference/api-reference/lifecycle/v1beta1/index.md#keptntask)
[KeptnTask](../reference/api-reference/lifecycle/v1/index.md#keptntask)
executes as a runner in an application
[container](https://kubernetes.io/docs/concepts/containers/),
which runs as part of a Kubernetes
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/installation/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If you installed your Keptn instance from the Manifest,
additional steps are required to use the Helm Chart to upgrade.
Contact us on Slack for assistance.

## Upgrade to v1beta1 version
## Upgrade to v1 version
mowies marked this conversation as resolved.
Show resolved Hide resolved

If you have previously used Keptn Lifecycle Operator with API
resources of version `v1alpha3` and `v1alpha4`, you need to
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/migrate/keptnapp/assets/keptnapp-migrated.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnApp
metadata:
name: "some-keptn-app"
Expand All @@ -12,7 +12,7 @@ spec:
version: 0.2.7
# removed pre/post-deployment tasks and evaluations
---
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnAppContext
metadata:
name: "some-keptn-app" # created a resource with the same name as KeptnApp
Expand Down
4 changes: 3 additions & 1 deletion docs/docs/migrate/keptnapp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@

The
[KeptnAppContext](../../reference/crd-reference/appcontext.md)
resource is new in the `v1beta1` API version.
resource was introduced in the `v1beta1` API version.
Existing
[KeptnApp](../../reference/crd-reference/app.md)
resources that were generated manually must be migrated
because of this new feature.
This page gives instructions for doing that.
Versions `v1beta1` and `v1` are fully compatible.

> **Note**
> Manual migration is only required for:
>
> * `KeptnApp` resources with older versions than `v1beta1`
> * Manually created `KeptnApp` resources
> * Automatically created `KeptnApp` resources with
> manually edited pre/post-deployment tasks or evaluations**
Expand Down
11 changes: 5 additions & 6 deletions docs/docs/reference/crd-reference/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ to the workloads.
## Synopsis

```yaml
apiVersion: lifecycle.keptn.sh/v1beta1
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnApp
metadata:
name: <app-name>
Expand Down Expand Up @@ -51,7 +51,7 @@ when the app discovery feature generates the `KeptnApp` resource:
it must have the same `namespace` as this `KeptnApp`.
- **labels**
- **app-kubernetes.io/managed-by: keptn** --
Tells Keptn that this resource was autogenerated, which is always the case for the `v1beta1` version.
Tells Keptn that this resource was autogenerated, which is always the case for the `v1` version.
- **spec**
- **version** (required) -- version of the Keptn application.
- **revision** -- revision of a `version`.
Expand Down Expand Up @@ -94,7 +94,7 @@ you can code them all into a single `KeptnTaskDefinition`.

## Example

This shows an example `v1beta1` `KeptnApp` resource with the corresponding [KeptnAppContext](appcontext.md) resource.
This shows an example `v1` `KeptnApp` resource with the corresponding [KeptnAppContext](appcontext.md) resource.

```yaml
{% include "../../migrate/keptnapp/assets/keptnapp-migrated.yaml" %}
Expand All @@ -104,12 +104,11 @@ This shows an example `v1beta1` `KeptnApp` resource with the corresponding [Kept

## Differences between versions

The synopsis of the `KeptnApp` resource is changed in the `v1beta1` API version:
The synopsis of the `KeptnApp` resource is changed in the `v1beta1` and newer API versions:

- The `apiVersion` field now references the `v1beta1` version of the `lifecycle.keptn.sh` API.
- `KeptnApp` is [autogenerated](../../guides/auto-app-discovery.md);
you cannot create it manually by applying a manifest.
- The `app.kubernetes.io/managed-by: keptn` label or annotation is always used for the `v1beta1` library
- The `app.kubernetes.io/managed-by: keptn` label or annotation is always used for the `v1beta1` and newer versions
because the `KeptnApp` resource is always autogenerated.
In earlier releases, this label was not included in `KeptnApp` resources that were created by applying a manifest
that had been created manually.
Expand Down
Loading
Loading