feat: add argocd documentation
This commit is contained in:
parent
43a211de81
commit
bcf3d992a5
1 changed files with 80 additions and 0 deletions
80
docs/argocd/argocd.md
Normal file
80
docs/argocd/argocd.md
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
# ArgoCD
|
||||
|
||||
## Install ArgoCD
|
||||
|
||||
```bash
|
||||
kubectl create namespace argocd
|
||||
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
|
||||
```
|
||||
|
||||
## Get initial admin password
|
||||
|
||||
```bash
|
||||
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
|
||||
```
|
||||
|
||||
## Boostrap the ArgoCD configuration using a Git repository
|
||||
|
||||
The manifests for the ArgoCD configuration are stored in a git repository. The repository in this example is located at
|
||||
`https://gitlab.simoncor.net/kaas/argocd.git` and the path within the repository is `argocd/`.
|
||||
|
||||
In this subfolder we have an ArgoCD Application manifest which bootstraps the ArgoCD configuration.
|
||||
We also have other manifests for configuring ArgoCD ingress configuration and applications.
|
||||
|
||||
```bash
|
||||
kubectl apply -f - <<EOF
|
||||
---
|
||||
apiVersion: "argoproj.io/v1alpha1"
|
||||
kind: "Application"
|
||||
metadata:
|
||||
name: "argocd"
|
||||
namespace: "argocd"
|
||||
spec:
|
||||
project: "default"
|
||||
source:
|
||||
repoURL: "https://gitlab.simoncor.net/kaas/argocd.git"
|
||||
path: "argocd/"
|
||||
targetRevision: "main"
|
||||
directory:
|
||||
recurse: true
|
||||
jsonnet: {}
|
||||
destination:
|
||||
server: "https://kubernetes.default.svc"
|
||||
namespace: "argocd"
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- "CreateNamespace=true"
|
||||
EOF
|
||||
```
|
||||
|
||||
## ArgoCD Applications
|
||||
|
||||
This is an example of an ArgoCD Application manifest which deploys this MkDocs application.
|
||||
|
||||
```yam
|
||||
---
|
||||
apiVersion: "argoproj.io/v1alpha1"
|
||||
kind: "Application"
|
||||
metadata:
|
||||
name: "docs-simoncor-net"
|
||||
namespace: "argocd"
|
||||
spec:
|
||||
project: "default"
|
||||
source:
|
||||
repoURL: "https://gitlab.simoncor.net/kaas/docs-simoncor-net.git"
|
||||
path: "manifests/"
|
||||
targetRevision: "main"
|
||||
destination:
|
||||
server: "https://kubernetes.default.svc"
|
||||
namespace: "docs-simoncor-net"
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
enabled: true
|
||||
syncOptions:
|
||||
- "CreateNamespace=true"
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue