Argo Events: Exposing Webhook Through a K8s Load Balancer on Azure Subnet

9/20/2021

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?

-- arythmetics
argo
argo-events
azure
kubernetes
webhooks

0 Answers