kubeshop / botkube

An app that helps you monitor your Kubernetes cluster, debug critical deployments & gives recommendations for standard practices
https://botkube.io
MIT License
2.14k stars 289 forks source link

Flux CD Executor Plugin #1016

Closed brampling closed 1 year ago

brampling commented 1 year ago

Overview

Botkube has existing support for kubectl and helm. We need to add support for the Flux CD CLI to run Flux commands through Botkube.

Acceptance Criteria

Stretch:

Reason

Flux CD support has been requested by the community and is useful for quickly managing Flux deployments from chat tools. See: https://github.com/fluxcd/flux2/discussions/3561

Notes

  1. Implement flux executor - small wrapper over x capabilities
    • support flux diff
    • integration tests are out of scope
    • prepare documentation

Story flow:

On GitHub pull request creation/update, notify about flux diff for a given PR.

  1. GitHub source plugin: get incoming event and pass it to a given source
    • support file path filter
    • support GitHub apps token and PAT
    • use polling to get GitHub events (we'll fit in the rate limits for sure)
    • ask for only updated stuff (modified header)
  2. Post a message about new PR with handy commands underneath
    • include flux diff in the dropdown
  3. Run flux diff
    • this command will be "wrapped" by us so that we can pass PR data (link/pr number/repo etc., whatever we need)
    • try to support coloring
  4. Flux executor outputs the command in interactive way
    • include "Post as a GitHub coment"
  5. GH executor takes input and posts as PR comment
mashby2022 commented 1 year ago

@mszostok and I met with the Flux Devrel and there's community interest. How should we proceed to put fit this into the engineering calendar