argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.68k stars 5.39k forks source link

Add the ability to exclude files when using the git file generator #468 #13690

Open christianh814 opened 1 year ago

christianh814 commented 1 year ago

NOTE: Original Issue found here

When using the git directory generator it is possible to exclude specific paths like this

  - git:
      repoURL: https://github.com/argoproj-labs/applicationset.git
      revision: HEAD
      directories:
      - path: examples/git-generator-directory/excludes/cluster-addons/*
      - path: examples/git-generator-directory/excludes/cluster-addons/exclude-helm-guestbook
        exclude: true

When using the git file generator I would like to be able to add files using a wildcard and then exclude specific files like this

spec:
  generators:
  - git:
      repoURL: https://github.com/argoproj-labs/applicationset.git
      revision: HEAD
      files:
      - path: "examples/git-generator-files-discovery/cluster-config/**/config.json"
      - path  "examples/git-generator-files-discovery/cluster-config/staging/config.json"
        exclude: true

Of course if there is another way to do this that I am not aware of then I would be happy to use that. If not I am also happy to implement this change if it is agreed.

MattiDeGrauwe commented 1 year ago

@christianh814 did you find a workaround for this? also in need for this feature

krisdock commented 1 year ago

we have a pressing need for this as well. thanks for working on it.

vl-kp commented 1 year ago

any workaround?

looks like there is a PR for this at here https://github.com/argoproj/applicationset/issues/468 but not migrated yet

hubmat00 commented 1 year ago

anyone knows if the proposed PR from old applicationset repo got ever moved to argoproj/argo-cd?

if not, would you mind if I take over this issue and move/migrate this proposed PR by @adamjohnson01 ?!

FYI @crenshaw-dev @adamjohnson01 as you were mainly involved in the original issue.