#argocd (2023-08)
2023-08-07

Good morning, Is it possible to deploy apps in argocd without creating a root app or using kubectl apply to create applications atleast once? I thought once I add a private repo to my argocd instance it should automatically deploy the manifests in my repository

This is somewhat similar to my question above. I haven’t yet found a solution here. Would love if someone could shed some light here.
How far can you nest the app of apps concept? I’m trying to nest it so I can delegate ownership (in code) to others that might want to create apps, but doesn’t have access argo-cd directly to add a new app. These individuals might test apps from various branches that they’d create. So, how would you nest app of app of apps….?

You can use an ApplicationSet
to watch paths in a repository and auto-apply them. You do have to create the initial applicationset which is a sort of root app.

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: applications
namespace: argocd
spec:
generators:
- git:
repoURL: <https://github.com/your-org/argo-apps>
revision: HEAD
directories:
- path: '*'
template:
metadata:
name: '{{path.basenameNormalized}}'
spec:
project: "apps"
source:
repoURL: <https://github.com/your-org/argo-apps>
targetRevision: HEAD
path: '{{path}}'
destination:
server: <https://kubernetes.default.svc>
namespace: '{{path.basenameNormalized}}'
syncPolicy:
automated:
prune: true
selfHeal: false
syncOptions:
- CreateNamespace=true

that’ll generate an application from every subdirectory in the argo-apps
repo

in its own namespace