WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Cloud Native / Custom webhook function to publish events into VMware Event Broker Appliance (VEBA)

Custom webhook function to publish events into VMware Event Broker Appliance (VEBA)

09.20.2021 by William Lam // Leave a Comment

In my previous article, I demonstrated how you can leverage the upcoming v0.7 release of the VMware Event Broker Appliance (VEBA) to publish and consume custom events to easily extend your event-driven automation to other event sources. As a recap, this is accomplished by constructing and sending a conformant CloudEvent to VEBA, which can then be consumed by your functions.


This is perfect for external event sources that can create a custom HTTP payload that conforms to the CloudEvent specification, however not all solutions have this type of functionality or flexibility. An alternative solution to this is to simply create a VEBA function that can accept a custom payload and then handle the transformation of the data into a valid CloudEvent and then forward that off to broker running within VEBA. This is just one of the many benefits of Knative, the backend for VEBA, where each function deployment includes an endpoint that is automatically served as a subdomain to the VEBA hostname (e.g. https://my-function.NAMESPACE.VEBA-FQDN)


This solution would enable external "Event Producer" to send a non-CloudEvent payload which can then be processed by your function and re-publish as a conformant CloudEvent that can then be consumed by other function and services.

  1. Event Provider would make HTTP request to the function webhook with a custom payload
  2. A conformant CloudEvent payload is constructed by the webhook function
  3. Webhook function will then forward the CloudEvent internally to the VMware Event Broker Appliance
  4. VEBA functions can now react to these custom CloudEvents

The only requirement to support custom webhook functions is that VEBA must be deployed with a wildcard DNS entry. This is required because each function deployment will translate into service endpoint with the following URL structure: https://[FUNCTION-NAME].[FUNCTION-NAMESPACE].[VEBA-FQDN] and your DNS server must be able to automatically resolve these dynamic endpoints.

You can view a specific function service URL by running the following command:

kubectl -n vmware-functions get ksvc [FUNCTION-NAME]


In my homelab, I am using Photon OS and Unbound for my DNS server.

Here is a typical DNS (forward and reverse record) using Unbound:

local-data: "vcenter.primp-industries.local A 192.168.30.84"
local-data-ptr: "192.168.30.84 vcenter.primp-industries.local"

Here is wildcard DNS record (which includes a forward and reverse entry) using Unbound:

local-zone: "veba.primp-industries.local." redirect
local-data: "veba.primp-industries.local. 3600 IN A 192.168.30.171"
local-data: "veba.primp-industries.local A 192.168.30.171"
local-data-ptr: "192.168.30.171 veba.primp-industries.local"

To configure wildcard DNS for your own DNS server, you should refer to the specific production documentation for guidance.

Once you have setup a wildcard DNS for your VEBA deployment, you can refer to this sample PowerShell function which demonstrates how to create and test a custom webhook function.

More from my site

  • vSphere Event-Driven Automation using VMware Event Router on VMware Cloud on AWS with Knative or AWS EventBridge
  • How to configure Knative and containerd in VMware Event Broker Appliance (VEBA) to use a private registry?
  • How to modernize your vSphere Alarm actions using the VMware Event Broker Appliance (VEBA)?
  • VMware Event Broker Appliance (VEBA) v0.6 is now available!
  • VMware Event Broker Appliance (VEBA) v0.8.0

Categories // Cloud Native, Kubernetes, vSphere Tags // Knative, VMware Event Broker Appliance, Webhook

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...