Skip to content

Instantly share code, notes, and snippets.

@dcherman
Created April 4, 2020 17:39
Show Gist options
  • Save dcherman/a1983966650728d811e67a0bbe13c064 to your computer and use it in GitHub Desktop.
Save dcherman/a1983966650728d811e67a0bbe13c064 to your computer and use it in GitHub Desktop.
# Info on GitHub Webhook: https://developer.github.com/v3/repos/hooks/#create-a-hook
apiVersion: argoproj.io/v1alpha1
kind: EventSource
metadata:
name: github-event-source
namespace: argo-events
spec:
type: "github"
github:
test:
owner: dherman
repository: argo-github-test
webhook:
endpoint: /argo-github-test
port: "12000"
method: "POST"
url: "http://my-external-url"
# type of events to listen to.
# following listens to everything, hence *
# You can find more info on https://developer.github.com/v3/activity/events/types/
events:
- "issue_comment"
- "push"
- "pull_request"
# apiToken refers to K8s secret that stores the github api token
apiToken:
# Name of the K8s secret that contains the access token
name: github-access-token
# Key within the K8s secret whose corresponding value (must be base64 encoded) is access token
key: token
# # webhookSecret refers to K8s secret that stores the github hook secret
# # +optional
# webhookSecret:
# # Name of the K8s secret that contains the hook secret
# name: github-access
# # Key within the K8s secret whose corresponding value (must be base64 encoded) is hook secret
# key: secret
insecure: true
active: true
contentType: "json"
githubBaseURL: https://github.mycompany.com/api/v3/
githubUploadURL: https://github.mycompany.com/api/uploads/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment