initial commit

This commit is contained in:
Tobias Brunner 2022-10-05 10:48:24 +02:00
commit 5a45c683e4
3 changed files with 10766 additions and 0 deletions

41
README.md Normal file
View file

@ -0,0 +1,41 @@
# GitOps for tbrnt
## Repo structure
* Each subdirectory is a namespace
* `_apps` is the meta directory for Argo CD apps
## Usage
### Argo CD
#### Access
Either
`sudo -E kubefwd svc -n argocd` and then https://argocd-server/
or
`kubectl port-forward svc/argocd-server -n argocd 8080:443` and
then https://localhost:8080/
#### CLI
* `argocd login argocd-server`
* `argocd app list`
* `argocd app sync <name>`
## Bootstrap GitOps
```
# install Argo CD
kubectl create ns argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-server -o name | cut -d'/' -f 2
argocd login argocd-server
# Instantiate Argo Root App
kubectl apply -f _apps/apps.yaml
```

21
_apps/argocd.yaml Normal file
View file

@ -0,0 +1,21 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: argocd
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: argocd
server: https://kubernetes.default.svc
project: system
source:
path: argocd
repoURL: https://git.tbrnt.ch/tobru/gitops-zurrli.git
targetRevision: HEAD
---
apiVersion: v1
kind: Namespace
metadata:
name: argocd

10704
argocd/argocd.yaml Normal file

File diff suppressed because it is too large Load diff