Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

Commit

Permalink
Merge pull request #154 from vaamarnath/update-arch-doc
Browse files Browse the repository at this point in the history
Design document update with MS Teams support
  • Loading branch information
Marko Mikulicic authored Jul 2, 2020
2 parents 01ff915 + 63f81f3 commit d5375fa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions docs/design.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,41 @@
# Kubewatch

Kubewatch contains three components: client, config, handler
Kubewatch contains three components: controller, config, handler

![Kubewatch Diagram](kubewatch.png?raw=true "Kubewatch Overview")

## Client

The client gets events from `kube-apiserver`, filtering and applying handler to event.

It contains a config object and embedded with a k8s client.

## Config

The config object contains `kubewatch` configuration, like handlers, filters.

A config object is used to creating new client.

## Controller

The controller initializes using the config object by reading the `.kubewatch.yaml` or command line arguments.
If the parameters are not fully mentioned, the config falls back to read a set of standard environment variables.

Controller creates necessary `SharedIndexInformer`s provided by `kubernetes/client-go` for listening and watching
resource changes. Controller updates this subscription information with Kubernetes API Server.

Whenever, the Kubernetes Controller Manager gets events related to the subscribed resources, it pushes the events to
`SharedIndexInformer`. This in-turn puts the events onto a rate-limiting queue for better handling of the events.

Controller picks the events from the queue and hands over the events to the appropriate handler after
necessary filtering.

## Handler

Handler manages how `kubewatch` handles events.

With each event get from k8s and matched filtering from configuration, it is passed to handler. Currently, `kubewatch` has 2 handlers:

- `Default`: which just print the event in JSON format
- `Slack`: which send notification to Slack channel based on information from config
- `Flock`: which send notification to Flock channel based on information from config
- `Hipchat`: which send notification to Hipchat room based on information from config
- `Mattermost`: which send notification to Mattermost channel based on information from config
- `Flock`: which send notification to Flock channel based on information from config
- `MS Teams`: which send notification to MS Team incoming webhook based on information from config
- `Slack`: which send notification to Slack channel based on information from config

More handlers will be added in future.

Expand Down
Binary file modified docs/kubewatch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d5375fa

Please sign in to comment.