configure argocd project for infra and infra/controllers

This commit is contained in:
Marcel Straub
2025-09-07 10:36:08 +02:00
parent 4c4b367418
commit 6251b7ce40
4 changed files with 58 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: infrastructure
namespace: argocd
labels:
dev.stonegarden: infrastructure
spec:
generators:
- git:
repoURL: https://git.straubintra.net/s5b-private/k8s/
revision: HEAD
directories:
- path: 02-k8s/infra/*
template:
metadata:
name: '{{ path.basename }}'
labels:
dev.stonegarden: infrastructure
spec:
project: infrastructure
source:
repoURL: https://git.straubintra.net/s5b-private/k8s/
targetRevision: HEAD
path: '{{ path }}'
destination:
name: in-cluster
namespace: argocd
syncPolicy:
automated:
selfHeal: true
prune: true

View File

@@ -5,7 +5,7 @@ metadata:
namespace: argocd
spec:
sourceRepos:
- 'https://github.com/vehagn/homelab'
- 'https://git.straubintra.net/s5b-private/k8s/'
destinations:
- namespace: 'argocd'
server: '*'

View File

@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
commonLabels:
s5b.org: infrastructure
app.kubernetes.io/managed-by: argocd
resources:
- project.yaml
- application-set.yaml

16
02-k8s/infra/project.yaml Normal file
View File

@@ -0,0 +1,16 @@
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
name: infrastructure
namespace: argocd
spec:
sourceRepos:
- 'https://git.straubintra.net/s5b-private/k8s/'
destinations:
- namespace: 'kube-system'
server: '*'
- namespace: 'argocd'
server: '*'
clusterResourceWhitelist:
- group: '*'
kind: '*'