I'm trying to route POST requests through a K8s Load Balancer to a Webhook in Argo Events. I can't find any clear documentation on this. I'm able to get the Webhook created and I can successfully communicate with it when I port forward the webhook-eventsource-svc. The Load Balancer is built fine and displays the external IP that I assign. However when I try to POST to the Load Balancer I just get a connection timed out error. I'm hoping I'm just configuring these manifests wrong.
Here is the manifest for both services.
apiVersion: argoproj.io/v1alpha1
kind: EventSource
metadata:
name: webhook
namespace: argo-events
spec:
service:
ports:
- port: 12000
targetPort: 12000
webhook:
example:
endpoint: /deploy
method: POST
port: "12000"
---
apiVersion: v1
kind: Service
metadata:
name: webhook-loadbalancer
namespace: argo-events
annotations:
service.beta.kubernetes.io/azure-load-balancer-internal: "true"
service.beta.kubernetes.io/azure-load-balancer-internal-subnet: DevelopSubnet
spec:
type: LoadBalancer
loadBalancerIP: 1XX.X.X.XXX
ports:
- protocol: TCP
port: 90
targetPort: 12000
selector:
app: webhook-eventsource-svc
controller: eventsource-controller
And here is how I am sending the request:
curl -d '@params.json' -H "Content-Type: application/json" -X POST http://1XX.X.X.XXX:90/deploy
Any suggestions?
just wanted to share how you expose the webhook so depending on the documentations when you want to expose a webhook
the next part is to create a service that will point to the webhook
last but not least you will have to expose the service with an endpoint (i am using ISTIO in my example here with virtual service)
it is very important to notice here that both
/webhook
inside theEventSource
is exactly matching the URL in youringress/virtualService