Connect webhooks (GitLab events) to functions right in GitLab's UI

Problem to solve

Connecting a webhook to a function (Knative Service) that is deployed. Right now this can be done by using GitLab eventing in Knative but this is quite cumbersome to set up and requires extra stuff to be deployed to the Cluster.

Target audience

Developers

Existing personas are: (copy relevant personas out of this comment, and delete any persona that does not apply)

  • Delaney, Development Team Lead, https://design.gitlab.com/research/personas#persona-delaney

  • Sasha, Software Developer, https://design.gitlab.com/research/personas#persona-sasha

Further details

Proposal

It should be straightforward for us to have a UI (probably on Serverless tab) which directs you to connect a webhook to your deployed function. We already know the URL of your deployed function so this should simply be about pre-filling the URL portion of Integrations > Webhooks. We may want to start by just doing it for the current project but you may also wish to configure webhooks for other projects than just the project the code is deployed to.

Some follow up issues to consider:

  • Make webhook auth simpler in this flow: You should add a secret token when configuring your webhook. Your deployed service should validate this token. Configuring this manually is cumbersome. If we could generate this token in GitLab and reconfigure your deployed app to validate this token for incoming requests then this would be awesome. Possibly consider using Istio Security somehow to do this.

What does success look like, and how can we measure that?

Users can easily configure webhooks to call their functions without needing to do anything with kubectl (ie. all from the UI). Right now actually this is already possible anyway by just copy/pasting the URL from the serverless tab into Integrations > Webhooks so the incremental value add here is adding this behaviour onto the Serverless tab and pre-filling the URL for you. Next incremental improvement for users should be automating the security aspect of this.

Links / references

Assignee Loading
Time tracking Loading