argoproj / applicationset

The ApplicationSet controller manages multiple Argo CD Applications as a single ApplicationSet unit, supporting deployments to large numbers of clusters, deployments of large monorepos, and enabling secure Application self-service.
https://argocd-applicationset.readthedocs.io/
Apache License 2.0
586 stars 279 forks source link

Multiple Repositories with git generator instead of monolithic repository #279

Open parasappafluke opened 3 years ago

parasappafluke commented 3 years ago

Hi, is it possible configure multiple git repositories with git generators directory subtype, instead of one monolithic git repository to have all the k8s apps configs?

jgwest commented 3 years ago

Hi @parasappafluke , take a look at the development builds: https://github.com/argoproj-labs/applicationset#development-builds

Specifically, recent builds have an SCM Provider generator which will look at a GitHub organization and extract the Git repositories URLs from it. This can be used to source multiple Git repositories for generated Applications.

Was this the kind of thing you were thinking of?

parasappafluke commented 3 years ago

This may solve my problem. However i have follow up questions.

  1. Can we combine this with list generator in Matrix generator.
  2. To name argocd application inside the template, is it possible to have path.basename of tracking directory with SCM Provider generator, like how we have in git generator directory subtype.
jgwest commented 3 years ago
  1. Yes, this will work
  2. Hmm, can you give me an example of how you would see this working? Eg what values you parameter valueswould expect to see for the path.basename?
parasappafluke commented 3 years ago

@jgwest thanks for confirming. Regarding #2 i want the application name in argocd and the service name in cluster should be dynamic based on the dir name of the app . e.g

lets say i have dir structure helm/x-app

In ArgoCD would like to see the app name as x-app-dev (for dev cluster) and service name in cluster should be x-app (this i can do it by passing helm-release in destination: section). But how do i get the path.basename using SCM generator.

I prefer to use single appset for all deployments.