github.com/argoproj/argo-events@v1.9.1/examples/event-sources/github.yaml (about) 1 # Info on GitHub Webhook: https://developer.github.com/v3/repos/hooks/#create-a-hook 2 apiVersion: argoproj.io/v1alpha1 3 kind: EventSource 4 metadata: 5 name: github 6 spec: 7 service: 8 ports: 9 - name: example 10 port: 12000 11 targetPort: 12000 12 - name: example-without-api-credentials 13 port: 13000 14 targetPort: 13000 15 github: 16 example: 17 repositories: 18 - owner: argoproj 19 names: 20 - argo-events 21 - argo-workflows 22 # Github application auth. Instead of using personal token `apiToken` use app PEM 23 # githubApp: 24 # privateKey: 25 # name: github-app-pem 26 # key: privateKey.pem 27 # appID: <app id> 28 # installationID: <app installation id> 29 # Github will send events to following port and endpoint 30 webhook: 31 # endpoint to listen to events on 32 endpoint: /push 33 # port to run internal HTTP server on 34 port: "12000" 35 # HTTP request method to allow. In this case, only POST requests are accepted 36 method: POST 37 # url the event-source will use to register at Github. 38 # This url must be reachable from outside the cluster. 39 # The name for the service is in `<event-source-name>-eventsource-svc` format. 40 # You will need to create an Ingress or Openshift Route for the event-source service so that it can be reached from GitHub. 41 url: http://url-that-is-reachable-from-GitHub 42 # type of events to listen to. 43 # following listens to everything, hence * 44 # You can find more info on https://developer.github.com/v3/activity/events/types/ 45 events: 46 - "*" 47 48 # apiToken refers to K8s secret that stores the github api token 49 # if apiToken is provided controller will create webhook on GitHub repo 50 # +optional 51 apiToken: 52 # Name of the K8s secret that contains the access token 53 name: github-access 54 # Key within the K8s secret whose corresponding value (must be base64 encoded) is access token 55 key: token 56 57 # # webhookSecret refers to K8s secret that stores the github hook secret 58 # # +optional 59 # webhookSecret: 60 # # Name of the K8s secret that contains the hook secret 61 # name: github-access 62 # # Key within the K8s secret whose corresponding value (must be base64 encoded) is hook secret 63 # key: secret 64 65 # type of the connection between event-source and Github. 66 # You should set it to false to avoid man-in-the-middle and other attacks. 67 insecure: true 68 # Determines if notifications are sent when the webhook is triggered 69 active: true 70 # The media type used to serialize the payloads 71 contentType: json 72 73 example-without-api-credentials: 74 owner: "argoproj" 75 repository: "argo" 76 webhook: 77 endpoint: "/push" 78 port: "13000" 79 method: "POST" 80 events: 81 - "*" 82 webhookSecret: 83 name: github-access 84 key: secret 85 insecure: true 86 active: true 87 contentType: "json" 88 89 # example-with-secure-connection: 90 # owner: "argoproj" 91 # repository: "argo" 92 # webhook: 93 # endpoint: "/push" 94 # port: "13000" 95 # method: "POST" 96 # url: "http://myargofakeurl.fake" 97 # # k8s secret that contains the cert 98 # serverCertSecret: 99 # name: my-secret 100 # key: cert-key 101 # # k8s secret that contains the private key 102 # serverKeySecret: 103 # name: my-secret 104 # key: pk-key 105 # events: 106 # - "push" 107 # - "delete" 108 # apiToken: 109 # name: github-access 110 # key: token 111 # webhookSecret: 112 # name: github-access 113 # key: secret 114 # insecure: true 115 # active: true 116 # contentType: "json"