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

     1  apiVersion: argoproj.io/v1alpha1
     2  kind: EventSource
     3  metadata:
     4    name: gerrit
     5  spec:
     6    service:
     7      ports:
     8        - port: 13000
     9          targetPort: 13000
    10    gerrit:
    11      example:
    12        projects:
    13          - "argo-webhook"
    14          - "argo/webhook"
    15        hookName: "argo-webhook-example"
    16        # Gerrit will send events to following port and endpoint
    17        webhook:
    18          # endpoint to listen to events on
    19          endpoint: /push
    20          # port to run internal HTTP server on
    21          port: "13000"
    22          # HTTP request method to allow. In this case, only POST requests are accepted
    23          method: POST
    24          # url the event-source will use to register at Gerrit.
    25          # This url must be reachable from outside the cluster.
    26          # The name for the service is in `<event-source-name>-eventsource-svc` format.
    27          # You will need to create an Ingress or Openshift Route for the event-source service so that it can be reached from Gerrit.
    28          url: http://url-that-is-reachable-from-Gerrit
    29        # events to listen to
    30        # Visit https://gerrit-review.googlesource.com/Documentation/cmd-stream-events.html#events
    31        events:
    32          - patchset-created
    33        auth:
    34          # username refers to K8s secret that stores the bitbucket username
    35          username:
    36            # Name of the K8s secret that contains the username
    37            name: gerrit-access
    38            # Key within the K8s secret whose corresponding value (must be base64 encoded) is username
    39            key: username
    40          # password refers to K8s secret that stores the bitbucket password (including App passwords)
    41          password:
    42            # Name of the K8s secret that contains the password
    43            name: gerrit-access
    44            # Key within the K8s secret whose corresponding value (must be base64 encoded) is password
    45            key: password
    46        # Do SSL verification when triggering the hook
    47        sslVerify: false
    48        # Gerrit Base url.
    49        # Change it to your private Gerrit instance url if you have one.
    50        gerritBaseURL: http://10.0.71.100:58080/
    51        deleteHookOnFinish: true
    52