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: deploy Keptn via ArgoCD #3256

Merged
merged 10 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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 .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -689,3 +689,4 @@ yourregistry
GOGC
otelcol
serviceapp
finalizer
50 changes: 50 additions & 0 deletions docs/docs/installation/configuration/argocd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
comments: true
---

# Deploy Keptn via ArgoCD

Keptn can be deployed on your Kubernetes cluster
via [ArgoCD](https://argoproj.github.io/cd/).

## Before you begin

To successfully deploy Keptn via ArgoCD, you need to
have ArgoCD installed on your cluster.
You can find the
[installation instructions](https://argo-cd.readthedocs.io/en/stable/operator-manual/installation/)
in the ArgoCD documentation.

## Creating Argo Application

After successfully installing ArgoCD, you need to create
an Argo Application and define the
repository containing Keptn helm charts:

```yaml
{% include "./assets/argo-app.yaml" %}
```

After applying the Application to your cluster,
Argo will fetch the state of the linked repository
and deploy the content via helm.

You can access the ArgoCD UI to see that
Keptn is up and running.

![keptn argo](./assets/argo-keptn.png)

> **Note**
Please be aware, that you need to enable
[cascading deletion](https://kubernetes.io/docs/concepts/architecture/garbage-collection/#cascading-deletion)
of the application, which is disabled by default in ArgoCD.
You can enable it by adding the deletion finalizers into your
Argo Application, like it's done in the example above.
More information about the deletion finalizers can be found
[here](https://argo-cd.readthedocs.io/en/stable/user-guide/app_deletion/#about-the-deletion-finalizer).

```yaml
metadata:
finalizers:
- resources-finalizer.argocd.argoproj.io # enabling cascading deletion
```
26 changes: 26 additions & 0 deletions docs/docs/installation/configuration/assets/argo-app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: keptn
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io # enabling cascading deletion
spec:
project: default
source:
repoURL: 'https://charts.lifecycle.keptn.sh' # helm chart repository
chart: keptn # helm chart name
targetRevision: 0.5.1 # helm chart version - use latest available here
helm:
parameters:
- name: "commitID"
value: "$ARGOCD_APP_REVISION"
destination:
server: 'https://kubernetes.default.svc' # server where Keptn will be deployed
namespace: keptn-system # namespace where Keptn will be deployed
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/docs/installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ See
[Running Keptn with vCluster](./configuration/vcluster.md)
for more information.

If you want to deploy Keptn via [ArgoCD](https://argoproj.github.io/cd/),
refer to the [Deploying Keptn via ArgoCD](./configuration/argocd.md) section
for more information.

## Basic installation

Keptn is installed onto an existing Kubernetes cluster
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ nav:
- How to structure your namespaces: docs/installation/configuration/namespace.md
- vCluster installation: docs/installation/configuration/vcluster.md
- Keptn + cert-manager.io: docs/installation/configuration/cert-manager.md
- Deploy Keptn via ArgoCD: docs/installation/configuration/argocd.md
- Installation Tips and Tricks: docs/installation/tips-tricks.md
- Troubleshooting Guide: docs/installation/troubleshooting.md
- Kubernetes cluster: docs/installation/k8s.md
Expand Down
Loading