Skip to content

Commit 799d2c8

Browse files
committed
update machinehealthcheck activity diagram
1 parent 467eed8 commit 799d2c8

File tree

2 files changed

+41
-20
lines changed

2 files changed

+41
-20
lines changed

docs/book/src/images/machinehealthcheck-controller.plantuml

Lines changed: 41 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,54 @@
22
@startuml machinehealthcheck-controller
33

44
start;
5-
:Machine Health Check controller;
5+
:MachineHealthCheck controller;
66
repeat
7-
repeat
8-
:MachineHealthCheck controller enqueues a Reconcile call;
9-
if (Nodes being watched in remote cluster) then (no)
7+
:MachineHealthCheck controller enqueues a Reconcile call;
8+
9+
if (Nodes being watched in remote cluster?) then (no)
1010
:Watch nodes in remote cluster;
1111
else (yes)
1212
endif
13-
:Find targets: Machines matched by selector plus respective Nodes;
14-
:Health check targets: Determine which Machines require remediation;
15-
repeat while (Remediations are allowed (current unhealthy <= max unhealthy)) is (no)
16-
-> yes;
17-
repeat
18-
if (Target requires remediation) then (yes)
19-
if (Machine is owned by a MachineSet) then (yes)
20-
if (Machine is a Control Plane Machine) then (no)
21-
#LightBlue:Delete Machine;
22-
else (yes)
13+
14+
:Find targets: Machines matched by selector;
15+
:Update ExpectedMachines and Targets in status;
16+
17+
#LightBlue:Health check targets: Determine healthy/unhealthy machines;
18+
:Update CurrentHealthy in status;
19+
20+
if (Remediation allowed?\n(conditions in spec.triggerIf met)) then (no)
21+
:Set RemediationsAllowed = 0;
22+
#LightBlue:Mark RemediationAllowedCondition as False;
23+
:Emit RemediationRestricted event;
24+
else (yes)
25+
:Calculate RemediationsAllowed count;
26+
#LightBlue:Mark RemediationAllowedCondition as True;
27+
28+
repeat
29+
if (Target is unhealthy?) then (yes)
30+
if (ExternalRemediationTemplate defined?) then (yes)
31+
if (External remediation request exists?) then (no)
32+
#LightBlue:Create external remediation request;
33+
#LightBlue:Set MachineExternallyRemediatedCondition;
34+
else (yes)
35+
endif
36+
else (no)
37+
if (Machine not in deletion AND\n(OwnerRemediated missing OR completed)?) then (yes)
38+
#LightBlue:Set MachineOwnerRemediatedCondition to False;
39+
else (no)
40+
endif
2341
endif
42+
:Emit MachineMarkedUnhealthy event;
2443
else (no)
44+
if (ExternalRemediationTemplate defined\nAND request exists?) then (yes)
45+
#LightBlue:Delete external remediation request;
46+
else (no)
47+
endif
2548
endif
26-
else (no)
27-
endif
28-
repeat while (more Targets) is (yes)
29-
-> no;
30-
repeat while (Targets likely to go unhealthy) is (yes: requeue with minimum
31-
time before timeout as delay)
49+
repeat while (More targets?) is (yes)
50+
-> no;
51+
endif
52+
repeat while (Any target likely to go unhealthy soon?) is (yes: requeue with\nminimum timeout delay)
3253
-> no;
3354
stop;
3455

39.4 KB
Loading

0 commit comments

Comments
 (0)