forked from HariSekhon/Kubernetes-configs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathargocd-apps.yaml
51 lines (47 loc) · 1.96 KB
/
argocd-apps.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#
# Author: Hari Sekhon
# Date: 2021-06-10 10:35:49 +0100 (Thu, 10 Jun 2021)
#
# vim:ts=2:sts=2:sw=2:et
# lint: k8s
#
# https://github.com/HariSekhon/Kubernetes-configs
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
#
# https://www.linkedin.com/in/HariSekhon
#
# ============================================================================ #
# A r g o C D A p p - o f - A p p s
# ============================================================================ #
# auto-tracks and loads other ArgoCD applications
# shows secrets and appprojects in argocd namespace as orphans, but does not remove them when pruning as they were never managed by this app
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: apps
namespace: argocd # must be whichever namespace you installed ArgoCD to - usually 'argocd' by default
# don't enable finalizer unless you want a cascading delete of all managed apps when you remove this app
#finalizers:
# - resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
# XXX: Edit - url to Git repo containing your k8s manifests
repoURL: https://github.com/argoproj/argocd-example-apps.git # keep .git suffix for GitLab, otherwise it'll 301 redirect which ArgoCD doesn't follow
targetRevision: HEAD
# XXX: Edit - path to argocd application configuration yamls
path: k8s/argocd/apps # relative to root of git repo so no leading slash
destination:
server: https://kubernetes.default.svc
#name: in-cluster
namespace: argocd
syncPolicy:
automated:
selfHeal: true
prune: false # for safety since if using finalizers in managed apps you could accidentally wipe out deployments via cascading deletes if you remove/rename anything under apps/ dir
syncOptions:
- ApplyOutOfSyncOnly=false