030-event-source-github.yaml 3.0 KB

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