github.com/argoproj/argo-events@v1.9.1/examples/event-sources/gitlab.yaml (about)

     1  # More info on GitLab project hooks: https://docs.gitlab.com/ce/api/projects.html#add-project-hook
     2  apiVersion: argoproj.io/v1alpha1
     3  kind: EventSource
     4  metadata:
     5    name: gitlab
     6  spec:
     7    service:
     8      ports:
     9        - port: 12000
    10          targetPort: 12000
    11    gitlab:
    12      example:
    13        # Project namespace paths or IDs
    14        projects:
    15          - "whynowy/test"
    16          - "3"
    17        # GitLab will send events to following port and endpoint
    18        webhook:
    19          # endpoint to listen to events on
    20          endpoint: /push
    21          # port to run internal HTTP server on
    22          port: "12000"
    23          # HTTP request method to allow. In this case, only POST requests are accepted
    24          method: POST
    25          # url the event-source will use to register at GitLab.
    26          # This url must be reachable from outside the cluster.
    27          # The name for the service is in `<event-source-name>-eventsource-svc` format.
    28          # You will need to create an Ingress or Openshift Route for the event-source service so that it can be reached from GitLab.
    29          url: http://url-that-is-reachable-from-GitLab
    30        # events to listen to
    31        # Visit https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#events
    32        events:
    33          - PushEvents
    34          - TagPushEvents
    35        # accessToken refers to K8s secret that stores the gitlab api token
    36        accessToken:
    37          # Key within the K8s secret whose corresponding value (must be base64 encoded) is access token
    38          key: token
    39          # Name of the K8s secret that contains the access token
    40          name: gitlab-access
    41        # secret token used by gitlab webhook
    42        secretToken:
    43          key: token
    44          name: gitlab-secret
    45        # Do SSL verification when triggering the hook
    46        enableSSLVerification: false
    47        # Gitlab Base url.
    48        # Change it to your private GitLab instance url if you have one.
    49        gitlabBaseURL: https://gitlab.com
    50        deleteHookOnFinish: true
    51  
    52  #    example-secure:
    53  #      projectId: "2"
    54  #      webhook:
    55  #        endpoint: "/push"
    56  #        port: "13000"
    57  #        method: "POST"
    58  #        url: "http://mysecondfakeurl.fake"
    59  #        # k8s secret that contains the cert
    60  #        serverCertSecret:
    61  #          name: my-secret
    62  #          key: cert-key
    63  #        # k8s secret that contains the private key
    64  #        serverKeySecret:
    65  #          name: my-secret
    66  #          key: pk-key
    67  #      events:
    68  #        - PushEvents
    69  #      accessToken:
    70  #        key: accesskey
    71  #        name: gitlab-access
    72  #      enableSSLVerification: true
    73  #      gitlabBaseURL: "YOUR_GITLAB_URL"