-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add state transition diagram focusing on dispatcher/runner split (#153)
- Loading branch information
1 parent
9cf4fd8
commit 4dffea6
Showing
2 changed files
with
81 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# AppWrapper State Diagram (Split Controller View) | ||
During its lifetime an AppWrapper instance will transition between a number of states. | ||
As is typical in Kubernetes resources, the current state of an AppWrapper is encoded by the | ||
values stored in multiple fields of its Status. | ||
|
||
The state diagram below depicts these transitions and the division of | ||
responsibility between our two controllers: the Dispatcher and Runner. | ||
The placement of each box indicates which controller is responsible | ||
for reconciling AppWrappers in that state and determining when its | ||
Status should be updated to initiated a transition to another state. | ||
The first row in each box indicates the `AppWrapperState` and the | ||
second indicates the `AppWrapperStep`. | ||
|
||
```mermaid | ||
stateDiagram-v2 | ||
%% Empty | ||
e : Empty | ||
%% Queued | ||
qi : Pending | ||
qi : Idle | ||
%% Running | ||
ri : Running | ||
ri : Dispatching | ||
ra : Running | ||
ra : Accepting | ||
rc : Running | ||
rc : Creating | ||
rcd : Running | ||
rcd : Created | ||
rd : Running | ||
rd : Deleting | ||
rf : Running | ||
rf : Deleted | ||
%% Succeeded | ||
si : Completed | ||
si : Idle | ||
%% Failed | ||
fc : Failed | ||
fc : Creating | ||
fcd : Failed | ||
fcd : Created | ||
fd : Failed | ||
fd : Deleting | ||
ff : Failed | ||
ff : Deleted | ||
fi: Failed | ||
fi : Idle | ||
Dispatcher : Dispatcher (Hub Cluster) | ||
state Dispatcher { | ||
e --> qi | ||
qi --> ri | ||
ri --> ra : create BindingPolicy | ||
rd --> rf | ||
rf --> qi : delete BindingPolicy | ||
fd --> ff | ||
ff --> fi : delete BindingPolicy | ||
} | ||
Runner : Runner (Spoke Cluster) | ||
state Runner { | ||
ra --> rc | ||
rc --> rcd | ||
rcd --> si | ||
rc --> rd | ||
rcd --> rd | ||
rc --> fc | ||
rc --> fd | ||
rcd --> fcd | ||
rcd --> fd | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters