Activate webhook-based automation in Openshift
In Openshift environments, you can activate webhooks by creating a route to expose the activation’s service, enabling external systems to send events and trigger automation.
Before you begin
- You have created a rulebook activation.
Note:
The following is an example of rulebook with a given webhook:
- name: Listen for storage-monitor events
hosts: all
sources:
- ansible.eda.webhook:
host: 0.0.0.0
port: 5000
rules:
- name: Rule - Print event information
condition: event.meta.headers is defined
action:
run_job_template:
name: StorageRemediation
organization: Default
job_args:
extra_vars:
message: from eda
sleep: 1Procedure
Testing with OpenShift (Kubernetes)
Configure Kubernetes networking (for example, Ingress) to temporarily expose activation webhooks for non-production testing and debugging.