Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional filter options for on_event triggers #1206

Closed
PrestonCS opened this issue Dec 13, 2023 · 4 comments · Fixed by #1351
Closed

Additional filter options for on_event triggers #1206

PrestonCS opened this issue Dec 13, 2023 · 4 comments · Fixed by #1351

Comments

@PrestonCS
Copy link

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.

Copy link

Hi 👋, thanks for opening an issue! Please note, it may take some time for us to respond, but we'll get back to you as soon as we can!

  • 💬 Slack Community: Join Robusta team and other contributors on Slack here.
  • 📖 Docs: Find our documentation here.
  • 🎥 YouTube Channel: Watch our videos here.

@arikalon1
Copy link
Contributor

Hi @PrestonCS

Just to clarify, you want to get a notification each time the any HPA in the cluster, changes the number of replicas?

@arikalon1
Copy link
Contributor

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?

@PrestonCS
Copy link
Author

@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.

@arikalon1 arikalon1 linked a pull request Apr 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants