Skip to content

Commit 91bd9f6

Browse files
committed
docs: garbage collection proposal
This is the proposal for the new garbage collection functionality. It was written post implementation to make sure we captured the intent of the change and to aid with the review. Even though its written post implementation it may merge first as the gc work has been split into smaller PRs to aid review. Signed-off-by: Richard Case <[email protected]>
1 parent d5f2f7a commit 91bd9f6

5 files changed

+479
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
@startuml
2+
autonumber
3+
actor User
4+
database APIServer
5+
control InfraClusterController
6+
participant gc_service
7+
collections other_services
8+
participant aws
9+
User -> APIServer: apply capi yaml
10+
InfraClusterController -> APIServer: watch (create/update)
11+
activate InfraClusterController
12+
InfraClusterController -> InfraClusterController: Add infra cluster finalizer
13+
opt if gc feature enabled
14+
InfraClusterController -> gc_service: Reconcile
15+
opt if gc annotation != false
16+
else
17+
gc_service -> gc_service: add gc finalizer
18+
end
19+
end
20+
InfraClusterController -> APIServer: patch infracluster
21+
InfraClusterController -> other_services: Reconcile
22+
other_services -> aws: create cluster infra
23+
other_services -> InfraClusterController: update status
24+
InfraClusterController -> APIServer: patch
25+
deactivate InfraClusterController
26+
@enduml
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@startuml
2+
autonumber
3+
actor User
4+
database APIServer
5+
control CAPIController
6+
control InfraClusterController
7+
participant gc_service
8+
collections other_services
9+
participant network_service
10+
participant aws
11+
User -> APIServer: delete cluster
12+
CAPIController -> APIServer: watch
13+
activate CAPIController
14+
CAPIController -> APIServer: delete infra (set timestamp)
15+
16+
InfraClusterController -> APIServer: watch (delete)
17+
activate InfraClusterController
18+
InfraClusterController -> other_services: Reconcile Delete
19+
other_services -> aws: Delete non-network infra
20+
opt if InfraCluster has gc finalizer
21+
InfraClusterController -> gc_service: ReconcileDelete
22+
gc_service -> aws: Delete tenant created resources (lb/sg)
23+
gc_service -> gc_service: remove gc finalizer
24+
gc_service -> APIServer: patch infracluster
25+
end
26+
InfraClusterController -> network_service: Reconcile Delete
27+
network_service -> aws: delete network infra
28+
InfraClusterController -> InfraClusterController: Remove infra finalizer
29+
InfraClusterController -> APIServer: patch
30+
deactivate InfraClusterController
31+
deactivate CAPIController
32+
APIServer -> APIServer: Delete infra cluster
33+
34+
@enduml

0 commit comments

Comments
 (0)