From a3dbf1a26ff889d4672d52fe17f43a5f2b38de74 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Wed, 28 Aug 2024 01:55:00 +1000 Subject: [PATCH] add webhook event source example for argo events --- .../base/examples/event-source.yaml | 37 +++++++++++++++++++ .../argo-events/base/kustomization.yaml | 3 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 infrastructures/argo-events/base/examples/event-source.yaml diff --git a/infrastructures/argo-events/base/examples/event-source.yaml b/infrastructures/argo-events/base/examples/event-source.yaml new file mode 100644 index 0000000..54730f2 --- /dev/null +++ b/infrastructures/argo-events/base/examples/event-source.yaml @@ -0,0 +1,37 @@ +apiVersion: argoproj.io/v1alpha1 +kind: EventSource +metadata: + name: webhook +spec: + service: + ports: + - port: 12000 + targetPort: 12000 + webhook: + # event-source can run multiple HTTP servers. Simply define a unique port to start a new HTTP server + example: + # port to run HTTP server on + port: "12000" + # endpoint to listen to + endpoint: /example + # HTTP request method to allow. In this case, only POST requests are accepted + method: POST + +# example-foo: +# port: "12000" +# endpoint: /example2 +# method: POST + +# Uncomment to use secure webhook +# example-secure: +# port: "13000" +# endpoint: "/secure" +# method: "POST" +# # k8s secret that contains the cert +# serverCertSecret: +# name: my-secret +# key: cert-key +# # k8s secret that contains the private key +# serverKeySecret: +# name: my-secret +# key: pk-key \ No newline at end of file diff --git a/infrastructures/argo-events/base/kustomization.yaml b/infrastructures/argo-events/base/kustomization.yaml index 852339a..eda4bd4 100644 --- a/infrastructures/argo-events/base/kustomization.yaml +++ b/infrastructures/argo-events/base/kustomization.yaml @@ -8,4 +8,5 @@ resources: - ./configmap.yaml - ./deployment.yaml - ./service.yaml - - ./examples/eventbus.yaml \ No newline at end of file + - ./examples/eventbus.yaml + - ./examples/event-source.yaml \ No newline at end of file