Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
chore: Add flowcharts that describe components of the shipyard contro…
Browse files Browse the repository at this point in the history
…ller (#5919)

Signed-off-by: Florian Bacher <[email protected]>
  • Loading branch information
bacherfl authored Nov 8, 2021
1 parent ca9742c commit 8aa4dd8
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions shipyard-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,36 @@ kubectl delete -f deploy/service.yaml

1. Download and install Swag for Go by calling `go get -u github.com/swaggo/swag/cmd/swag` in fresh terminal.
2. `cd` to the Shipyard Controller's root folder and run `swag init --parseDependency`

## Technical Details

### Sequence handling
The shipyard controller orchestrates sequences by listening for certain events, such as `.triggered` events that should trigger a sequence,
or events that indicate the start/completion of a task execution by one of Keptns execution plane services. Further, it is responsible for the
following tasks:

- Dispatching sequences while ensuring that there are no multiple sequences running in the same stage for the same service at any given point in time
- Sending out `.triggered` events that indicate that a task within a sequence should be executed
- Cancelling sequences when a timeout for a task has been detected

The following flow charts illustrate the workflow of how these responsibilities are handled by the shipyard controller:

**Reception of a .triggered event:**

![handleTriggeredEvent](assets/handleTriggeredEvent.png?raw=true "handleTriggeredEvent")

**Dispatching Sequences:**

![sequenceDispatcher](assets/sequenceDispatcher.png?raw=true "sequenceDispatcher")

**Watching for timed out tasks:**

![sequenceWatcher](assets/sequenceWatcher.png?raw=true "sequenceWatcher")

**Keep track of .started events:**

![handleStartedEvent](assets/handleStartedEvent.png?raw=true "handleStartedEvent")

**Keep track of .finished events:**

![handleFinishedEvent](assets/handleFinishedEvent.png?raw=true "handleFinishedEvent")
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added shipyard-controller/assets/handleStartedEvent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added shipyard-controller/assets/sequenceDispatcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added shipyard-controller/assets/sequenceWatcher.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 8aa4dd8

Please sign in to comment.