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

gitlab eventsource support for groups #2386

Closed
jwillker opened this issue Dec 29, 2022 · 2 comments · Fixed by #2474
Closed

gitlab eventsource support for groups #2386

jwillker opened this issue Dec 29, 2022 · 2 comments · Fixed by #2474
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jwillker
Copy link
Contributor

Is your feature request related to a problem? Please describe.
My company has a GitLab with a lot of groups and subgroups with thousands of projects, so if I want to create an event source to listen to all my company webhooks or a particular group is a huge pain to write all in an EventsSource object, and maintain this updated is another pain, because everyday new projects die and born.

E.g:

apiVersion: argoproj.io/v1alpha1
kind: EventSource
metadata:
  annotations:
  name: gitlab-webhook
  namespace: argo-events
spec:
  gitlab:
    my-company:
      events:
      - JobEvents
      gitlabBaseURL: https://gitlab.my-company.com/api/v4
      projects:
      - my-company/group1/subgroup1/projectA
      - my-company/group1/subgroup1/projectB
      - my-company/group1/subgroup1/projectC
      - my-company/group2/subgroup1/projectA
      - my-company/group2/subgroup72/projectZ
      - ....

I have about 8k projects now 😢

Describe the solution you'd like
It would be nice if the GitlabEventSource had a new field, group that accepts a group path and create the webhook at the group level instead of a specific project. This allows us to receive events from a specific group or all the groups of the company.

Describe alternatives you've considered
Other solutions that I can take is create a EventsSource to a unique project and use their listener URL to create manually a webook in some GitLab groups. This works I have tested but its is ugly and depend of manual actions for each Group.


Message from the maintainers:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

@jwillker jwillker added the enhancement New feature or request label Dec 29, 2022
@whynowy whynowy added the help wanted Extra attention is needed label Jan 4, 2023
@neo502721
Copy link
Contributor

@whynowy I've done some development and I'm testing it now. Can you assign to me ?

neo502721 added a commit to neo502721/argo-events that referenced this issue Feb 14, 2023
neo502721 added a commit to neo502721/argo-events that referenced this issue Feb 14, 2023
neo502721 added a commit to neo502721/argo-events that referenced this issue Feb 14, 2023
whynowy pushed a commit that referenced this issue Feb 23, 2023
@jwillker
Copy link
Contributor Author

Hey @whynowy and @neo502721, great implementation, but with a little bug:

The group hook is created just like the project hook but missing the secret token.

I`m just opening a PR to fix this: #2550.

jwillker pushed a commit to jwillker/argo-events that referenced this issue Mar 29, 2023
argoproj#2474)

Signed-off-by: neo502721 <zgmhdu@163.com>
Signed-off-by: JohnWillker <frazao.jhonn@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants