Skip to content

Commit

Permalink
docs: use helm charts instead of manifests + document KeptnConfig CRD (
Browse files Browse the repository at this point in the history
…#747)

Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
  • Loading branch information
odubajDT committed Mar 8, 2023
1 parent b2bb268 commit 338c0fa
Show file tree
Hide file tree
Showing 12 changed files with 131 additions and 24 deletions.
36 changes: 31 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ Click to watch it on YouTube:

### Installation

Use the following command sequence to install the latest release of the Keptn Lifecycle Toolkit:

```shell
helm repo add klt https://charts.lifecycle.keptn.sh
helm repo update
helm upgrade --install keptn klt/klt -n keptn-lifecycle-toolkit-system --create-namespace --wait
```

For installing the Lifecycle Toolkit via manifests use:

<!---x-release-please-start-version-->

```shell
Expand All @@ -54,12 +64,10 @@ kubectl apply -f https://github.com/keptn/lifecycle-toolkit/releases/download/v0

<!---x-release-please-end-->

to install the latest release of the Lifecycle Toolkit.

The Lifecycle Toolkit uses the OpenTelemetry collector to provide a vendor-agnostic implementation of how to receive,
process and export telemetry data. To install it, follow
their [installation instructions](https://opentelemetry.io/docs/collector/getting-started/).
We also provide some more information about this in our [observability example](./examples/support/observability/).
We provide some information about this in our [observability example](./examples/support/observability/).

The Lifecycle Toolkit includes a Mutating Webhook which requires TLS certificates to be mounted as a volume in its pod.
The certificate creation
Expand Down Expand Up @@ -415,7 +423,8 @@ spec:
key: prometheusLoginCredentials
```

**Note:** The KeptnMetricsProvider is a new resource in KLT 0.7.0.
> **Note:**
The KeptnMetricsProvider is a new resource in KLT 0.7.0.
The [migration documentation](./docs/content/en/docs/tasks/migrate-keptnevaluationprovider/_index.md)
provides information about how to upgrade from 0.6.0 and earlier versions to 0.7.0.

Expand Down Expand Up @@ -447,10 +456,27 @@ of the `KeptnMetric` resource. Specifying the `.spec.objectives[i].keptnMetricRe
If it's not specified, KLT searches for the `KeptnMetric` resource in the namespace where `KeptnEvaluationDefinition`
resource is stored. If the `KeptnMetric` resource cannot be found there, it searches in the default KLT namespace (`keptn-lifecycle-toolkit-system`).

**Note:** Please be aware that, if
> **Note:**
Please be aware that, if
the `.spec.objectives[i].keptnMetricRef.namespace` of `KeptnEvaluationDefinition`
resource is specified and the `KeptnMetric` resource does not exist in this namespace, the evaluation fails.

### Keptn Config

The `KeptnConfig` is a CRD defines configuration values for the Keptn Lifecycle Toolkit.
Currently, it can be used to configure the URL of the OpenTelemetry collector.

A `KeptnConfig` looks like the following:

```yaml
apiVersion: options.keptn.sh/v1alpha1
kind: KeptnConfig
metadata:
name: keptnconfig-sample
spec:
OTelCollectorUrl: 'otel-collector:4317'
```

## Install a dev build

The [GitHub CLI](https://cli.github.com/) can be used to download the manifests of the latest CI build.
Expand Down
6 changes: 4 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ To set up a local Docsy build:
make build
```

**Note:** To utilize the `makefile`, you must have GNU **make**
> **Note:**
To utilize the `Makefile`, you must have GNU **make**
available on your local machine.
Versions are available for all the usual Operating Systems.

Expand All @@ -102,7 +103,8 @@ Note that Hugo updates the rendered documentation each time you write the file.

`http://localhost:1314/docs-dev/`

**Note:** By default, Hugo serves the local docs on port 1313.
> **Note:**
By default, Hugo serves the local docs on port 1313.
We have modified that port for the lifecycle-toolkit docs
to avoid conflicts with the keptn.github.io docs, which use
port 1313 for local builds.
Expand Down
3 changes: 2 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ make build
make server
```

Note: If the above command is not working try with `sudo` command.
> **Note:**
If the above command is not working try with `sudo` command.

After the server is running on <http://localhost:1314>.
Any modification in the docs folder will be reflected on the server under the dev revision.
Expand Down
25 changes: 25 additions & 0 deletions docs/content/en/docs/concepts/keptnConfig/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: KeptnConfig
description: Learn what Keptn Configs 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 Config

A `KeptnConfig` CRD defines configuration values for the Keptn Lifecycle Toolkit.
Currently, it can be used to configure the URL of the OpenTelemetry collector.

A `KeptnConfig` looks like the following:

```yaml
apiVersion: options.keptn.sh/v1alpha1
kind: KeptnConfig
metadata:
name: keptnconfig-sample
spec:
OTelCollectorUrl: 'otel-collector:4317'
```
3 changes: 2 additions & 1 deletion docs/content/en/docs/crd-ref/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ This section provides comprehensive reference information about the
[Custom Resource Definitions (CRDs)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/)
that are defined for the Keptn Lifecycle Toolkit.

**NOTE: This section is under development.
> **NOTE:**
This section is under development.
Information that is published here has been reviewed for technical accuracy
but the format and content is still evolving.
We welcome your input!**
41 changes: 40 additions & 1 deletion docs/content/en/docs/snippets/tasks/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,43 @@

## Install version 0.6.0 and above

In version 0.6.0 and later, you can install the Lifecycle Toolkit using the current release manifest:
In version 0.6.0 and later, you can install the Lifecycle Toolkit using helm charts,
or manifests.

For installing the Lifecycle Toolkit via Helm chart:

```shell
helm repo add klt https://charts.lifecycle.keptn.sh
helm repo update
helm upgrade --install keptn klt/klt -n keptn-lifecycle-toolkit-system --create-namespace --wait
```

To install a specific version, use the `--version <version>` flag as part of the
`helm upgrade --install` command.

To list available versions:

```shell
helm repo update
helm search repo keptn-lifecycle-toolkit
```

The `helm upgrade --install` command offers a flag called `--set`, which can be used to specify
configuration options using the format key1=value1,key2=value2,....

Or you could download the chart value file and modify it using

```shell
helm get values RELEASE_NAME [flags] > values.yaml
```

and install adding `--values=values.yaml` to your `helm upgrade` command (official documentation
available [here](https://helm.sh/docs/helm/helm_get_values/)).

The full list of available flags can be found in the [helm-charts](https://github.com/keptn/lifecycle-toolkit/blob/main/helm/chart/README.md).

All versions of the Lifecycle Toolkit can be installed using manifests,
with a command like the following:

<!---x-release-please-start-version-->

Expand All @@ -15,6 +51,9 @@ kubectl wait --for=condition=Available deployment/lifecycle-operator -n keptn-li

The Lifecycle Toolkit and its dependencies are now installed and ready to use.

> **Note:**
Installation of the Lifecycle Toolkit version 0.5.0 and lower is not supported via helm charts.

## Install version 0.5.0 and earlier

You must first install *cert-manager* with the following commands:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ Additionally, the script stores the migrated manifests in your current working d
The script will also ask the user to apply the created manifests and delete the deprecated
`KeptnEvaluationProvider` CRs.

**Note:** Please be aware that only `KeptnEvaluationProvider` CRs from the cluster your kubecontext is pointing
> **Note:**
Please be aware that only `KeptnEvaluationProvider` CRs from the cluster your kubecontext is pointing
to will be fetched and migrated.
5 changes: 3 additions & 2 deletions examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ install: install-observability install-argo
@echo "-----------------------------------"
@echo "Create Namespace and install Keptn-lifecycle-toolkit"
@echo "-----------------------------------"
kubectl apply -f https://github.com/keptn/lifecycle-toolkit/releases/download/v0.5.0/manifest.yaml #x-release-please-version
kubectl wait --for=condition=available deployment/lifecycle-operator -n keptn-lifecycle-toolkit-system --timeout=300s
helm repo add klt https://charts.lifecycle.keptn.sh
helm repo update
helm upgrade --install keptn klt/klt -n keptn-lifecycle-toolkit-system --create-namespace --wait

.PHONY: install-observability
install-observability:
Expand Down
9 changes: 6 additions & 3 deletions klt-cert-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ operator deployment changes.

You’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for
testing, or run against a remote cluster.
**Note:** Your controller will automatically use the current context in your kubeconfig file (i.e. whatever
> **Note:**
Your controller will automatically use the current context in your kubeconfig file (i.e. whatever
cluster `kubectl cluster-info` shows).

### Running on the cluster
Expand Down Expand Up @@ -78,7 +79,8 @@ make install
make run
```

**NOTE:** You can also run this in one step by running: `make install run`
> **Note:**
You can also run this in one step by running: `make install run`

### Modifying the API definitions

Expand All @@ -88,6 +90,7 @@ If you are editing the API definitions, generate the manifests such as CRs or CR
make manifests
```

**NOTE:** Run `make --help` for more information on all potential `make` targets
> **Note:**
Run `make --help` for more information on all potential `make` targets

More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)
9 changes: 6 additions & 3 deletions metrics-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
You’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster
for testing, or run against a remote cluster.

**Note:** Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster
> **Note:**
Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster
`kubectl cluster-info` shows).

### Running on the cluster
Expand Down Expand Up @@ -75,7 +76,8 @@ which provides a reconcile function responsible for synchronizing resources unti
make run
```

**NOTE:** You can also run this in one step by running: `make install run`
> **Note:**
You can also run this in one step by running: `make install run`

### Modifying the API definitions

Expand All @@ -85,7 +87,8 @@ If you are editing the API definitions, generate the manifests such as CRs or CR
make manifests
```

**NOTE:** Run `make --help` for more information on all potential `make` targets
> **Note:**
Run `make --help` for more information on all potential `make` targets

More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)

Expand Down
9 changes: 6 additions & 3 deletions operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

You’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for
testing, or run against a remote cluster.
**Note:** Your controller will automatically use the current context in your kubeconfig file (i.e. whatever
> **Note:**
Your controller will automatically use the current context in your kubeconfig file (i.e. whatever
cluster `kubectl cluster-info` shows).

### Running on the cluster
Expand Down Expand Up @@ -76,7 +77,8 @@ make install
make run
```

**NOTE:** You can also run this in one step by running: `make install run`
> **Note:**
You can also run this in one step by running: `make install run`

### Modifying the API definitions

Expand All @@ -86,7 +88,8 @@ If you are editing the API definitions, generate the manifests such as CRs or CR
make manifests
```

**NOTE:** Run `make --help` for more information on all potential `make` targets
> **Note:**
Run `make --help` for more information on all potential `make` targets

More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)

Expand Down
6 changes: 4 additions & 2 deletions scheduler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

You’ll need a Kubernetes cluster v0.24.0 or higher to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a
local cluster for testing, or run against a remote cluster.
**Note:** Your controller will automatically use the current context in your kubeconfig file (i.e. whatever
> **Note:**
Your controller will automatically use the current context in your kubeconfig file (i.e. whatever
cluster `kubectl cluster-info` shows).

### Running on the cluster
Expand All @@ -21,7 +22,8 @@ cluster `kubectl cluster-info` shows).
make build-and-push-local RELEASE_REGISTRY=<some-registry>
```

**NOTE:** Run `make --help` for more information on all potential `make` targets
> **Note:**
Run `make --help` for more information on all potential `make` targets

1. Generate your release manifest

Expand Down

0 comments on commit 338c0fa

Please sign in to comment.