020-event-source-github.yaml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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-event-source
  6. namespace: argo-events
  7. spec:
  8. type: github
  9. github:
  10. example:
  11. # owner of the repo
  12. owner: eugeniucarvalho
  13. # repository name
  14. repository: app
  15. # Github will send events to following port and endpoint
  16. webhook:
  17. # endpoint to listen to events on
  18. endpoint: /push
  19. # port to run internal HTTP server on
  20. port: "12000"
  21. # HTTP request method to allow. In this case, only POST requests are accepted
  22. method: POST
  23. # url the gateway will use to register at Github.
  24. # This url must be reachable from outside the cluster.
  25. # The gateway pod is backed by the service defined in the gateway spec. So get the URL for that service Github can reach to.
  26. url: https://deploy.monteasua.com.br
  27. # type of events to listen to.
  28. # following listens to everything, hence *
  29. # You can find more info on https://developer.github.com/v3/activity/events/types/
  30. events:
  31. - "*"
  32. # # Namespace where the api token and webhook secret live.
  33. # # +Optional. Default to gateway's namespace.
  34. # namespace: "argo-events"
  35. # apiToken refers to K8s secret that stores the github api token
  36. apiToken:
  37. # Name of the K8s secret that contains the access token
  38. name: github-access
  39. # Key within the K8s secret whose corresponding value (must be base64 encoded) is access token
  40. key: token
  41. # # webhookSecret refers to K8s secret that stores the github hook secret
  42. # # +optional
  43. # webhookSecret:
  44. # # Name of the K8s secret that contains the hook secret
  45. # name: github-access
  46. # # Key within the K8s secret whose corresponding value (must be base64 encoded) is hook secret
  47. # key: secret
  48. # type of the connection between gateway and Github.
  49. # You should set it to false to avoid man-in-the-middle and other attacks.
  50. insecure: true
  51. # Determines if notifications are sent when the webhook is triggered
  52. active: true
  53. # The media type used to serialize the payloads
  54. contentType: json
  55. # example-with-secure-connection:
  56. # owner: "argoproj"
  57. # repository: "argo"
  58. # webhook:
  59. # endpoint: "/push"
  60. # port: "13000"
  61. # method: "POST"
  62. # url: "http://myargofakeurl.fake"
  63. # # path to file that is mounted in gateway pod which contains certs
  64. # serverCertPath: "some path in pod"
  65. # # path to file that is mounted in gateway pod which contains private key
  66. # serverKeyPath: "some path in pod"
  67. # events:
  68. # - "push"
  69. # - "delete"
  70. # apiToken:
  71. # name: github-access
  72. # key: token
  73. # webhookSecret:
  74. # name: github-access
  75. # key: secret
  76. # insecure: true
  77. # active: true
  78. # contentType: "json"