You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/proposals/20210526-cluster-class-and-managed-topologies.md
+15-10Lines changed: 15 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ status: provisional
70
70
## Glossary
71
71
72
72
### ClusterClass
73
-
A collection of templates that define a topology (control planeand machine deployments) to be used to continuously reconcile one or more Clusters.
73
+
A collection of templates that define a topology (control plane, machine deployments and machine pools) to be used to continuously reconcile one or more Clusters.
74
74
75
75
### Topology
76
76
A topology refers to a Cluster that provides a single control point to manage its own topology; the topology is defined by a ClusterClass.
@@ -85,7 +85,7 @@ We're enhancing the Cluster CRD and controller to use a ClusterClass resource to
85
85
86
86
Currently, Cluster API does not expose a native way to provision multiple clusters of the same configuration. The ClusterClass object is supposed to act as a collection of template references which can be used to create managed topologies.
87
87
88
-
Today, the Cluster object is a logical grouping of components which describe an underlying cluster. The user experience to create a cluster requires the user to create a bunch of underlying resources such as KCP (control plane provider), MachineDeployments, and infrastructure or bootstrap templates for those resources which logically end up representing the cluster. Since the cluster configuration is spread around multiple components, upgrading the cluster version is hard as it requires changes to different fields in different resources to perform an upgrade. The ClusterClass object aims at reducing this complexity by delegating the responsibility of lifecycle managing these underlying resources to the Cluster controller.
88
+
Today, the Cluster object is a logical grouping of components which describe an underlying cluster. The user experience to create a cluster requires the user to create a bunch of underlying resources such as KCP (control plane provider), MachineDeployments, MachinePools and infrastructure or bootstrap templates for those resources which logically end up representing the cluster. Since the cluster configuration is spread around multiple components, upgrading the cluster version is hard as it requires changes to different fields in different resources to perform an upgrade. The ClusterClass object aims at reducing this complexity by delegating the responsibility of lifecycle managing these underlying resources to the Cluster controller.
89
89
90
90
This method of provisioning the cluster would act as a single control point for the entire cluster. Scaling the nodes, adding/removing sets of worker nodes and upgrading cluster kubernetes versions would be achievable by editing the topology. This would facilitate the maintenance of existing clusters as well as ease the creation of newer clusters.
91
91
@@ -124,7 +124,7 @@ As a cluster operator, I want to use one `ClusterClass` to create multiple topol
124
124
125
125
#### Story 2 - Easier UX for Kubernetes version upgrades
126
126
For a cluster operator, the UX to update the Kubernetes version of the control plane and worker nodes in the cluster should be easy.
127
-
- Instead of individually modifying the KCP and each MachineDeployment, updating a single option should result in k8s version updates for all the CP and worker nodes.
127
+
- Instead of individually modifying the KCP and each MachineDeployment or MachinePool, updating a single option should result in k8s version updates for all the CP and worker nodes.
128
128
129
129
**Note**: In order to complete the user story for all the providers, some of the advanced features (such as Extensibility/Transformation) are required. However, getting this in place even only for a subset of providers allows us to build and test a big chunk of the entire machinery.
130
130
@@ -202,6 +202,10 @@ at high level the new CRD contains:
202
202
- The reference to the infrastructureMachine template (e.g. AWSMachineTemplate) to be used when creating machine deployment machines.
203
203
- Additional attributes to be set when creating the machine deployment object, like metadata, nodeDrainTimeout, rolloutStrategy etc.
204
204
- The definition of a MachineHealthCheck to be created for monitoring machine deployment machines.
205
+
- And/or a set of MachinePoolClasses, each one with:
206
+
- The reference to the bootstrap template (e.g. KubeadmConfigTemplate) to be used when creating machine pools.
207
+
- The reference to the infrastructureMachinePool template (e.g. DockerMachinePoolTemplate) to be used when creating machine pools.
208
+
- Additional attributes to be set when creating the machine pool object, like metadata, nodeDrainTimeout, etc.
205
209
- A list of patches, allowing to change above templates for each specific Cluster.
206
210
- A list of variable definitions, defining a set of additional values the users can provide on each specific cluster;
207
211
those values can be used in patches.
@@ -251,8 +255,9 @@ At high level the cluster topology is defined by:
251
255
- The link to the MachineDeployment class defining the templates to use for this MachineDeployment
252
256
- The number of replicas for this MachineDeployment as well as overrides/additional values for metadata, nodeDrainTimeout etc.
253
257
Additionally it is also possible to override the control plane's MachineHealthCheck.
258
+
- The above also applies for machine pools.
254
259
- A set of variables allowing to customize the cluster topology through patches. Please note that it is also possible
255
-
to define variable overrides for each MachineDeployments.
260
+
to define variable overrides for each MachineDeployment or MachinePool.
256
261
257
262
More info in [writing a ClusterClass](https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-class/write-clusterclass.html).
258
263
@@ -264,14 +269,14 @@ API definitions; additionally please consider the following:
264
269
**ClusterClass**
265
270
266
271
- It is not allowed to change apiGroup or Kind for the referenced templates (with the only exception of the bootstrap templates).
267
-
- MachineDeploymentClass cannot be removed as long as they are used in Clusters.
272
+
- MachineDeploymentClass and MachinePoolClass cannot be removed as long as they are used in Clusters.
268
273
- It’s the responsibility of the ClusterClass author to ensure the patches are semantically valid, in the sense they
269
274
generate valid templates for all the combinations of the corresponding variables in input.
270
275
- Variables cannot be removed as long as they are used in Clusters.
271
276
- When changing variable definitions, the system validates schema changes against existing clusters and blocks in case the changes are
272
277
not compatible (the variable value is not compatible with the new variable definition).
273
278
274
-
Note: we are considering adding a field to allow smoother deprecations of MachineDeploymentClass and/or variables, but this
279
+
Note: we are considering adding a field to allow smoother deprecations of MachineDeploymentClass, MachinePoolClass and/or variables, but this
275
280
is not yet implemented as of today.
276
281
277
282
**Cluster**
@@ -420,10 +425,10 @@ This section talks about updating a Cluster which was created using a `ClusterCl
420
425
1. User updates the `cluster.spec.topology`.
421
426
2. System compares and updates InfrastructureCluster object, if the computed object after the change is different than the current one.
422
427
3. System compares and updates ControlPlane object, if necessary. This includes also comparing and rotating the InfrastructureMachineTemplate, if necessary.
423
-
4. System compares and updates MachineDeployment object, if necessary. This includes also
424
-
1. Adding/Removing MachineDeployment, if necessary.
425
-
2. Comparing and rotating the InfrastructureMachineTemplate and BootstrapTemplate for the existing MachineDeployments, if necessary.
426
-
3. Comparing and updating the replicas, labels, annotations and version of the existing MachineDeployments, if necessary.
428
+
4. System compares and updates MachineDeployment and/or MachinePool object, if necessary. This includes also
429
+
1. Adding/Removing MachineDeployment/MachinePool, if necessary.
430
+
2. Comparing and rotating the InfrastructureMachineTemplate and BootstrapTemplate for the existing MachineDeployments/MachinePools, if necessary.
431
+
3. Comparing and updating the replicas, labels, annotations and version of the existing MachineDeployments/MachinePools, if necessary.
427
432
5. System compares and updates MachineHealthCheck objects corresponding to ControlPlane or MachineDeployments, if necessary.
428
433
429
434

0 commit comments