GitOps scaffold: Argo CD bootstrap, app-of-apps, example workload
This commit is contained in:
parent
3b609b3077
commit
7cc6824e01
6 changed files with 112 additions and 3 deletions
4
bootstrap/argocd-namespace.yaml
Normal file
4
bootstrap/argocd-namespace.yaml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: argocd
|
||||
15
bootstrap/repo-forgejo.yaml
Normal file
15
bootstrap/repo-forgejo.yaml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Registers the Forgejo repo with Argo CD.
|
||||
# For SSH access, create a secret with the deploy key instead:
|
||||
# kubectl -n argocd create secret generic forgejo-repo-creds \
|
||||
# --from-file=sshPrivateKey=/path/to/deploy_key
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: repo-forgejo-gitops
|
||||
namespace: argocd
|
||||
labels:
|
||||
argocd.argoproj.io/secret-type: repository
|
||||
stringData:
|
||||
type: git
|
||||
url: http://localhost:3000/forgejoadmin/gitops-apps.git
|
||||
# username/password or sshPrivateKey go here when the repo is private
|
||||
22
bootstrap/root-app.yaml
Normal file
22
bootstrap/root-app.yaml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# App-of-Apps: applying this one Application redeploys every workload
|
||||
# defined under apps/ onto the target cluster.
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: root-app
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: http://localhost:3000/forgejoadmin/gitops-apps.git
|
||||
targetRevision: main
|
||||
path: apps
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: argocd
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
Loading…
Add table
Add a link
Reference in a new issue