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

Botkube Automation #789

Closed
brampling opened this issue Oct 4, 2022 · 4 comments · Fixed by kubeshop/botkube-docs#175
Closed

Botkube Automation #789

brampling opened this issue Oct 4, 2022 · 4 comments · Fixed by kubeshop/botkube-docs#175
Assignees
Labels
enhancement New feature or request epic Describes a high-level epic(with subtasks)
Milestone

Comments

@brampling
Copy link
Contributor

brampling commented Oct 4, 2022

A user must be able to configure an automation action based on a selected incoming event. This allows the user to perform automatic problem resolution, automatically initiate early troubleshooting steps, and otherwise enhance their time to recovery when an issue occurs. Currently users are notified of events through a configured channel and must take all action manually either through Botkube or through other CLI and UI-based tools.

AC

  • Users can configure Botkube to watch for a specific event type
  • Users can filter the watched events
  • Users can configure an executor action to trigger on the selected/filtered event (in other words, a given event triggers a given executor command).
  • Relevant event details and metadata are passed to the executor action (i.e. pod name on a pod-related event)
  • Configured actions are executed when the configured event occurs
  • A notification is sent to the appropriate channel when an automated action occurs (ideally through the k8s event system and not only through Botkube, so that the event is logged in the k8s infrastructure)
  • Configured actions can be enabled/disabled dynamically through chat commands (e.g. @Botkube list/enable/disable automations)
  • Consult the configuration draft with @lpetkov
@pkosiec pkosiec moved this to Todo in Botkube Oct 19, 2022
@pkosiec pkosiec added this to the v0.16.0 milestone Oct 19, 2022
@pkosiec
Copy link
Collaborator

pkosiec commented Oct 24, 2022

Notes

  • Executed command could be defined in config as a Go template string, rendered with events.Event object in context:

    # (...) for a given event the following command will be executed:
    command: "kubectl get {{.Event.ResourceType}} -m {{.Event.Namespace}} {{.Event.Name}}" # namespace and name are from the `Event` object
  • The output is sent to the channel with a header that the command was executed by automation rule.

  • Making the events.Event generic is out of scope for now, it will be done as a part of Event Manager Extensibility #649. But take this into account to make sure the config could support other events in a generic way

@ezodude ezodude changed the title BotKube Automation Botkube Automation Oct 24, 2022
@ezodude
Copy link
Contributor

ezodude commented Oct 28, 2022

In the acceptance criteria:

Users can filter the watched events

I'm not sure what this means??

@brampling
Copy link
Contributor Author

For example, the previous AC means we would watch for "pod create" events. This AC means I can filter those pod create events. Maybe I only want to trigger on a pod create matching a specific name pattern, or a specific annotation.

@ezodude
Copy link
Contributor

ezodude commented Oct 31, 2022

@brampling added a ticket to cover this: #832

@pkosiec pkosiec moved this from Todo to In Progress in Botkube Nov 3, 2022
@pkosiec pkosiec self-assigned this Nov 3, 2022
@pkosiec pkosiec moved this from In Progress to To Review in Botkube Nov 23, 2022
Repository owner moved this from To Review to Done in Botkube Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request epic Describes a high-level epic(with subtasks)
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants