feat(argocd): Creating AppProjects for ArgoCD

This commit is contained in:
Vegard Hagen
2023-01-07 20:03:43 +01:00
parent d81b83c243
commit a1a7d5c13f
9 changed files with 62 additions and 15 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ metadata:
finalizers: finalizers:
- resources-finalizer.argocd.argoproj.io - resources-finalizer.argocd.argoproj.io
spec: spec:
project: default project: applications
source: source:
path: apps/arr path: apps/arr
repoURL: https://github.com/vehagn/homelab repoURL: https://github.com/vehagn/homelab
+4 -4
View File
@@ -6,14 +6,14 @@ metadata:
finalizers: finalizers:
- resources-finalizer.argocd.argoproj.io - resources-finalizer.argocd.argoproj.io
spec: spec:
destination: project: applications
namespace: home-assistant
name: in-cluster
project: default
source: source:
path: apps/home-assistant path: apps/home-assistant
repoURL: https://github.com/vehagn/homelab repoURL: https://github.com/vehagn/homelab
targetRevision: HEAD targetRevision: HEAD
destination:
namespace: home-assistant
name: in-cluster
syncPolicy: syncPolicy:
automated: {} automated: {}
syncOptions: syncOptions:
+4 -4
View File
@@ -6,14 +6,14 @@ metadata:
finalizers: finalizers:
- resources-finalizer.argocd.argoproj.io - resources-finalizer.argocd.argoproj.io
spec: spec:
destination: project: applications
namespace: plex
name: in-cluster
project: default
source: source:
path: apps/plex path: apps/plex
repoURL: https://github.com/vehagn/homelab repoURL: https://github.com/vehagn/homelab
targetRevision: HEAD targetRevision: HEAD
destination:
namespace: plex
name: in-cluster
syncPolicy: syncPolicy:
automated: {} automated: {}
syncOptions: syncOptions:
+1 -1
View File
@@ -6,7 +6,7 @@ metadata:
finalizers: finalizers:
- resources-finalizer.argocd.argoproj.io - resources-finalizer.argocd.argoproj.io
spec: spec:
project: default project: applications
source: source:
path: apps/whoami path: apps/whoami
repoURL: https://github.com/vehagn/homelab repoURL: https://github.com/vehagn/homelab
+20 -1
View File
@@ -1,4 +1,22 @@
apiVersion: argoproj.io/v1alpha1 apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
name: applications
namespace: argocd
spec:
sourceRepos:
- 'https://github.com/vehagn/*'
destinations:
- namespace: 'arr'
server: '*'
- namespace: 'home-assistant'
server: '*'
- namespace: 'plex'
server: '*'
- namespace: 'whoami'
server: '*'
---
apiVersion: argoproj.io/v1alpha1
kind: Application kind: Application
metadata: metadata:
name: applications name: applications
@@ -6,12 +24,13 @@ metadata:
finalizers: finalizers:
- resources-finalizer.argocd.argoproj.io - resources-finalizer.argocd.argoproj.io
spec: spec:
project: default project: app-of-apps
source: source:
path: apps path: apps
repoURL: https://github.com/vehagn/homelab repoURL: https://github.com/vehagn/homelab
targetRevision: HEAD targetRevision: HEAD
destination: destination:
namespace: argocd
name: in-cluster name: in-cluster
syncPolicy: syncPolicy:
automated: automated:
+18 -2
View File
@@ -1,17 +1,33 @@
apiVersion: argoproj.io/v1alpha1 apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
name: infrastructure
namespace: argocd
spec:
sourceRepos:
- 'https://github.com/vehagn/*'
destinations:
- namespace: 'metallb-system'
server: '*'
clusterResourceWhitelist:
- group: '*'
kind: '*'
---
apiVersion: argoproj.io/v1alpha1
kind: Application kind: Application
metadata: metadata:
name: infra name: infrastructure
namespace: argocd namespace: argocd
finalizers: finalizers:
- resources-finalizer.argocd.argoproj.io - resources-finalizer.argocd.argoproj.io
spec: spec:
project: infra project: app-of-apps
source: source:
path: infra path: infra
repoURL: https://github.com/vehagn/homelab repoURL: https://github.com/vehagn/homelab
targetRevision: HEAD targetRevision: HEAD
destination: destination:
namespace: argocd
name: in-cluster name: in-cluster
syncPolicy: syncPolicy:
automated: automated:
+2 -1
View File
@@ -6,7 +6,8 @@ resources:
- namespace.yaml - namespace.yaml
- https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml - https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
- ingress.yaml - ingress.yaml
- infra.yaml - project.yaml
- infrastructure.yaml
- applications.yaml - applications.yaml
# Let Traefik manage TLS-termination # Let Traefik manage TLS-termination
+11
View File
@@ -0,0 +1,11 @@
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
name: app-of-apps
namespace: argocd
spec:
sourceRepos:
- 'https://github.com/vehagn/*'
destinations:
- namespace: 'argocd'
server: '*'
+1 -1
View File
@@ -6,7 +6,7 @@ metadata:
finalizers: finalizers:
- resources-finalizer.argocd.argoproj.io - resources-finalizer.argocd.argoproj.io
spec: spec:
project: default project: infrastructure
source: source:
path: infra/metallb path: infra/metallb
repoURL: https://github.com/vehagn/homelab repoURL: https://github.com/vehagn/homelab