Enable Argo CD self-management via dedicated Application

Create app-argocd Application to manage argocd resources using kustomize.
Update stack Application exclusion to allow Application manifests while
excluding direct resource management (prevents namespace errors from
directory recursion bypassing kustomization).

Architecture:
- stack Application manages Application manifests (app-*.yaml)
- argocd Application manages argocd resources via kustomize
- Both Applications can self-manage through this pattern

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
CTO Agent 2026-07-12 09:25:19 +00:00
parent 8f537b8f82
commit fe9301f891
3 changed files with 23 additions and 2 deletions

20
apps/app-argocd.yaml Normal file
View file

@ -0,0 +1,20 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: argocd
namespace: argocd
spec:
project: default
source:
repoURL: git@forgejo.forgejo.svc.cluster.local:basicstack/stack.basicstack.de.git
targetRevision: main
path: apps/argocd
destination:
server: https://kubernetes.default.svc
namespace: argocd
syncPolicy:
automated:
prune: false # Manual approval for deletions
selfHeal: true
syncOptions:
- CreateNamespace=true

View file

@ -11,6 +11,9 @@ spec:
path: apps path: apps
directory: directory:
recurse: true recurse: true
exclude: |
argocd/*
!argocd/app-*.yaml
destination: destination:
server: https://kubernetes.default.svc server: https://kubernetes.default.svc
syncPolicy: syncPolicy:

View file

@ -31221,8 +31221,6 @@ kind: ConfigMap
metadata: metadata:
labels: labels:
app.kubernetes.io/name: argocd-cm app.kubernetes.io/name: argocd-cm
annotations:
test.self-management: "enabled"
data: data:
url: https://argo.basicstack.de url: https://argo.basicstack.de
oidc.config: | oidc.config: |