Some of the EventSources (
Storage GRID and
stripe) start an HTTP service to receive the events, for
your convenience, there is a field named
service within EventSource spec can
help you create a
ClusterIP service for testing.
apiVersion: argoproj.io/v1alpha1 kind: EventSource metadata: name: webhook spec: service: ports: - port: 12000 targetPort: 12000 webhook: example: port: "12000" endpoint: /example method: POST
However, the generated service is ONLY for testing purpose, if you want to
expose the endpoint for external access, please manage it by using native K8s
objects (i.e. a Load Balancer type Service, or an Ingress), and remove
field from the EventSource object.
For example, you can create a K8s service with the selector
to select pods created for the "webhook" event source, like the following:
apiVersion: v1 kind: Service metadata: name: webhook-eventsource spec: ports: - port: 12000 protocol: TCP targetPort: 12000 selector: eventsource-name: webhook type: NodePort
Then you can expose the service for external access using native K8s objects as mentioned above.
You can refer to webhook heath check if you need a health check endpoint for LB Service or Ingress configuration.