Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-1.2] 📖 Add cluster-resource-set-controller to docs #6798

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
- [Control Plane](./developer/architecture/controllers/control-plane.md)
- [MachinePool](./developer/architecture/controllers/machine-pool.md)
- [ClusterTopology](./developer/architecture/controllers/cluster-topology.md)
- [ClusterResourceSet](./developer/architecture/controllers/cluster-resource-set.md)
- [Metadata propagation](./developer/architecture/controllers/metadata-propagation.md)
- [Multi-tenancy](./developer/architecture/controllers/multi-tenancy.md)
- [Support multiple instances](./developer/architecture/controllers/support-multiple-instances.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/book/src/developer/architecture/controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Documentation for the CAPI controllers can be found at:
- [MachinePool](./controllers/machine-pool.md)
- ClusterClass
- [Cluster Topology](./controllers/cluster-topology.md)
- AddOns
- [ClusterResourceSet](./controllers/cluster-resource-set.md)


<!-- links -->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# `ClusterResourceSet` Controller

The `ClusterResourceSet` provides a mechanism for applying resources - e.g. pods, deployments, daemonsets, secrets, configMaps - to a cluster once it is created.

![ClusterResourceSet Controller Activity Diagram](../../../images/cluster-resource-set-controller.png)

Its main responsibility is to automatically apply a set of resources to newly-created and existing Clusters. Resources will be applied only once.


### Additional information

* See ClusterResourceSet [proposal](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20200220-cluster-resource-set.md)
28 changes: 28 additions & 0 deletions docs/book/src/images/cluster-resource-set-controller.plantuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@startuml
!pragma useVerticalIf on
start
:ClusterResourceSet Controller;
repeat
:ClusterResourceSet controller enqueues a Reconcile call;
:Fetch the ClusterResourceSet instance in namespace;
repeat
if (Cluster matches ClusterResourceSet's selector) then (yes)
if (Get ClusterResourceSetBinding for the cluster) then (exists)
else (doesn't exist)
:Create ClusterResourceSetBinding object for the cluster;
endif
if (ResourceSetBinding for a given ClusterResourceSet exists) then (yes)
else (no)
:Create ResourceSetBinding;
endif
:Get Resoures in ClusterResourceSet;
if (Check applied condition of resource in ResourceSetBinding) then (false)
:Apply resource to cluster;
:Set applied condition to true in ResourceSetBinding;
endif
:Mark ResourcesAppliedCondition to true;
endif
repeat while (More clusters?)
repeat while (More updates to ClusterResourceSet?)
stop
@enduml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.