Skip to content

Commit 57d70e0

Browse files
authored
Merge pull request #6782 from ramineni/add-clusterresourceset-controller-docs
📖 Add cluster-resource-set-controller to docs
2 parents 51f9db9 + 28f4931 commit 57d70e0

File tree

5 files changed

+43
-0
lines changed

5 files changed

+43
-0
lines changed

docs/book/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
- [Control Plane](./developer/architecture/controllers/control-plane.md)
6262
- [MachinePool](./developer/architecture/controllers/machine-pool.md)
6363
- [ClusterTopology](./developer/architecture/controllers/cluster-topology.md)
64+
- [ClusterResourceSet](./developer/architecture/controllers/cluster-resource-set.md)
6465
- [Metadata propagation](./developer/architecture/controllers/metadata-propagation.md)
6566
- [Multi-tenancy](./developer/architecture/controllers/multi-tenancy.md)
6667
- [Support multiple instances](./developer/architecture/controllers/support-multiple-instances.md)

docs/book/src/developer/architecture/controllers.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Documentation for the CAPI controllers can be found at:
1616
- [MachinePool](./controllers/machine-pool.md)
1717
- ClusterClass
1818
- [Cluster Topology](./controllers/cluster-topology.md)
19+
- AddOns
20+
- [ClusterResourceSet](./controllers/cluster-resource-set.md)
1921

2022

2123
<!-- links -->
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# `ClusterResourceSet` Controller
2+
3+
The `ClusterResourceSet` provides a mechanism for applying resources - e.g. pods, deployments, daemonsets, secrets, configMaps - to a cluster once it is created.
4+
5+
![ClusterResourceSet Controller Activity Diagram](../../../images/cluster-resource-set-controller.png)
6+
7+
Its main responsibility is to automatically apply a set of resources to newly-created and existing Clusters. Resources will be applied only once.
8+
9+
10+
### Additional information
11+
12+
* See ClusterResourceSet [proposal](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20200220-cluster-resource-set.md)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
@startuml
2+
!pragma useVerticalIf on
3+
start
4+
:ClusterResourceSet Controller;
5+
repeat
6+
:ClusterResourceSet controller enqueues a Reconcile call;
7+
:Fetch the ClusterResourceSet instance in namespace;
8+
repeat
9+
if (Cluster matches ClusterResourceSet's selector) then (yes)
10+
if (Get ClusterResourceSetBinding for the cluster) then (exists)
11+
else (doesn't exist)
12+
:Create ClusterResourceSetBinding object for the cluster;
13+
endif
14+
if (ResourceSetBinding for a given ClusterResourceSet exists) then (yes)
15+
else (no)
16+
:Create ResourceSetBinding;
17+
endif
18+
:Get Resoures in ClusterResourceSet;
19+
if (Check applied condition of resource in ResourceSetBinding) then (false)
20+
:Apply resource to cluster;
21+
:Set applied condition to true in ResourceSetBinding;
22+
endif
23+
:Mark ResourcesAppliedCondition to true;
24+
endif
25+
repeat while (More clusters?)
26+
repeat while (More updates to ClusterResourceSet?)
27+
stop
28+
@enduml
Loading

0 commit comments

Comments
 (0)