Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCM Generator Enhancement: Exclusion Labels #10652

Open
DaytonG opened this issue Sep 20, 2022 · 1 comment
Open

SCM Generator Enhancement: Exclusion Labels #10652

DaytonG opened this issue Sep 20, 2022 · 1 comment
Labels
component:applications-set Bulk application management related enhancement New feature or request

Comments

@DaytonG
Copy link

DaytonG commented Sep 20, 2022

Summary

I'm using the SCM generator to gather a list of repositories from a private gitlab enterprise server. I would like to use a label to exclude repos, like block-deploy to instead deny certain repos from being deployed.

Motivation

We split our gitlab groups into separate areas per company effort. Some of those projects are in the incubation phase, and should be ignored in certain environments. It would be nice to assume that all "deploy-.*" repos are available and instead exclude repos using repo tag metadata. Less repos to touch.

Proposal

The first idea that comes to mind is to add a new "excludeLabel" filter type.

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: myapps
spec:
  generators:
  - scmProvider:
      filters:
      - repositoryMatch: ^myapp
        pathsExist: [kubernetes/kustomization.yaml]
        # a new filter that checks for the presence of a label. If found: ignore the repo
        excludeLabel: "block-deploy"
  template:
  # ...

That being said, I'm not familiar with the code structure of filters.

@DaytonG DaytonG added the enhancement New feature or request label Sep 20, 2022
@DaytonG DaytonG changed the title SCM Provider Enhancement: Exclusion Labels SCM Generator Enhancement: Exclusion Labels Sep 20, 2022
@crenshaw-dev
Copy link
Collaborator

I think we should use matchExpressions, similar to the request for PR generators: #12300

@crenshaw-dev crenshaw-dev added the component:applications-set Bulk application management related label Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:applications-set Bulk application management related enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants