Skip to content

Commit 179e620

Browse files
committed
event-source
1 parent 989f72b commit 179e620

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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+
namespace: events
7+
spec:
8+
service:
9+
ports:
10+
- name: gitops
11+
port: 12000
12+
targetPort: 12000
13+
14+
github:
15+
gitops:
16+
repositories:
17+
- owner: micxba
18+
names:
19+
- gitops
20+
# Github application auth. Instead of using personal token `apiToken` use app PEM
21+
# githubApp:
22+
# privateKey:
23+
# name: github-app-pem
24+
# key: privateKey.pem
25+
# appID: <app id>
26+
# installationID: <app installation id>
27+
# Github will send events to following port and endpoint
28+
webhook:
29+
# endpoint to listen to events on
30+
endpoint: /push
31+
# port to run internal HTTP server on
32+
port: "12000"
33+
# HTTP request method to allow. In this case, only POST requests are accepted
34+
method: POST
35+
# url the event-source will use to register at Github.
36+
# This url must be reachable from outside the cluster.
37+
# The name for the service is in `<event-source-name>-eventsource-svc` format.
38+
# You will need to create an Ingress or Openshift Route for the event-source service so that it can be reached from GitHub.
39+
url: http://event-hook-gh.sith.network
40+
# type of events to listen to.
41+
# following listens to everything, hence *
42+
# You can find more info on https://developer.github.com/v3/activity/events/types/
43+
events:
44+
- "*"
45+
46+
# apiToken refers to K8s secret that stores the github api token
47+
# if apiToken is provided controller will create webhook on GitHub repo
48+
# +optional
49+
# apiToken:
50+
# # Name of the K8s secret that contains the access token
51+
# name: github-access
52+
# # Key within the K8s secret whose corresponding value (must be base64 encoded) is access token
53+
# key: token
54+
55+
# # webhookSecret refers to K8s secret that stores the github hook secret
56+
# # +optional
57+
# webhookSecret:
58+
# # Name of the K8s secret that contains the hook secret
59+
# name: github-access
60+
# # Key within the K8s secret whose corresponding value (must be base64 encoded) is hook secret
61+
# key: secret
62+
63+
# type of the connection between event-source and Github.
64+
# You should set it to false to avoid man-in-the-middle and other attacks.
65+
insecure: true
66+
# Determines if notifications are sent when the webhook is triggered
67+
active: true
68+
# The media type used to serialize the payloads
69+
contentType: json

0 commit comments

Comments
 (0)