Skip to content

Commit 2e04c0e

Browse files
committed
chore: let argocd manage bootstrap as well
1 parent add5308 commit 2e04c0e

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-1
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{{- if .Values.bootstrap.enabled }}
2+
apiVersion: argoproj.io/v1alpha1
3+
kind: AppProject
4+
metadata:
5+
name: bootstrap
6+
namespace: argocd
7+
spec:
8+
description: bootstrap project
9+
clusterResourceWhitelist:
10+
- group: '*'
11+
kind: '*'
12+
destinations:
13+
- namespace: '*'
14+
server: '*'
15+
sourceRepos:
16+
- '*'
17+
---
18+
apiVersion: argoproj.io/v1alpha1
19+
kind: Application
20+
metadata:
21+
name: bootstrap
22+
namespace: argocd
23+
annotations:
24+
argocd.argoproj.io/sync-wave: "-1"
25+
finalizers:
26+
- resources-finalizer.argocd.argoproj.io
27+
spec:
28+
project: bootstrap
29+
syncPolicy:
30+
automated:
31+
selfHeal: true
32+
prune: true
33+
syncOptions:
34+
- CreateNamespace=true
35+
ignoreDifferences:
36+
- group: argoproj.io
37+
kind: Application
38+
jsonPointers:
39+
- /spec/syncPolicy/automated
40+
destination:
41+
name: in-cluster
42+
namespace: bootstrap
43+
source:
44+
path: 'bootstrap/argocd'
45+
repoURL: https://github.com/locmai/humble.git
46+
targetRevision: "{{ .Values.bootstrap.targetRevision }}"
47+
{{- end }}

bootstrap/app/values.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ global:
22
enabled: true
33
domain: "maibaloc.com"
44

5+
bootstrap:
6+
enabled: true
7+
targetRevision: main
8+
59
system:
610
enabled: true
711
targetRevision: main
@@ -16,4 +20,4 @@ apps:
1620

1721
external_apps:
1822
enabled: true
19-
targetRevision: main
23+
targetRevision: main

0 commit comments

Comments
 (0)