From fe9301f8914a9d590e3fae6b226029ec6b47c61f Mon Sep 17 00:00:00 2001 From: CTO Agent Date: Sun, 12 Jul 2026 09:25:19 +0000 Subject: [PATCH] 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 --- apps/app-argocd.yaml | 20 ++++++++++++++++++++ apps/argocd/app-stack-basicstack-de.yaml | 3 +++ apps/argocd/argocd-install.yaml | 2 -- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 apps/app-argocd.yaml diff --git a/apps/app-argocd.yaml b/apps/app-argocd.yaml new file mode 100644 index 0000000..f583f2d --- /dev/null +++ b/apps/app-argocd.yaml @@ -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 diff --git a/apps/argocd/app-stack-basicstack-de.yaml b/apps/argocd/app-stack-basicstack-de.yaml index e9a9d38..68091db 100644 --- a/apps/argocd/app-stack-basicstack-de.yaml +++ b/apps/argocd/app-stack-basicstack-de.yaml @@ -11,6 +11,9 @@ spec: path: apps directory: recurse: true + exclude: | + argocd/* + !argocd/app-*.yaml destination: server: https://kubernetes.default.svc syncPolicy: diff --git a/apps/argocd/argocd-install.yaml b/apps/argocd/argocd-install.yaml index 47e9efc..e954941 100644 --- a/apps/argocd/argocd-install.yaml +++ b/apps/argocd/argocd-install.yaml @@ -31221,8 +31221,6 @@ kind: ConfigMap metadata: labels: app.kubernetes.io/name: argocd-cm - annotations: - test.self-management: "enabled" data: url: https://argo.basicstack.de oidc.config: |