Additional filter options for on_event triggers
Closed this issue · 4 comments
Currently can only filter event triggers based on name prefix, namespace_prefix, and labels.
I have the need to create some info alerts for HPA scaling events where the name does not have a common prefix and the events have no labels.
It would be great to add ability to regex on the name and or filter on event source component.
Hi @PrestonCS
Just to clarify, you want to get a notification each time the any HPA in the cluster, changes the number of replicas?
If the above is what you want, I think you can achieve it using this playbook:
customPlaybooks:
- triggers:
- on_horizontalpodautoscaler_update: {}
actions:
- resource_babysitter:
omitted_fields: []
fields_to_monitor: ["status.desiredReplicas"]
Does that help?
@arikalon1 That should work for this specific use case I mentioned. However I still think it would be nice to have the other options for additional filters for other events.