|
1 | 1 |
|
2 | 2 | # Writing a ClusterClass
|
3 | 3 |
|
4 |
| -While a ClusterClass can be also used for a single Cluster, usually a ClusterClass is used across many |
5 |
| -clusters. Therefore a ClusterClass becomes more useful when it's flexible enough to support a wide |
6 |
| -range of use cases. The goal of this document is to explain how ClusterClasses can be written in |
7 |
| -general and how they can be written in a way that they are flexible enough to support many use cases. |
| 4 | +A ClusterClass becomes more useful and valuable when it can be used to create many Cluster of a similar |
| 5 | +shape. The goal of this document is to explain how ClusterClasses can be written in a way that they are |
| 6 | +flexible enough to be used in as many Cluster as possible by supporting variants of the same base Cluster shape. |
8 | 7 |
|
9 | 8 | **Table of Contents**
|
10 | 9 |
|
@@ -113,15 +112,16 @@ Best practices:
|
113 | 112 | of a ClusterClass to another, consider including a version suffix in the ClusterClass name.
|
114 | 113 | For more information about changing a ClusterClass please see: [Changing a ClusterClass].
|
115 | 114 | * Prefix the templates used in a ClusterClass with the name of the ClusterClass.
|
116 |
| -* Don't use templates with the same name in multiple ClusterClasses. This is automatically taken care |
| 115 | +* Don't reuse the same template in multiple ClusterClasses. This is automatically taken care |
117 | 116 | of by prefixing the templates with the name of the ClusterClass.
|
118 | 117 |
|
119 | 118 | <aside class="note">
|
120 | 119 |
|
121 | 120 | <h1>Tip: clusterctl alpha topology plan</h1>
|
122 | 121 |
|
123 |
| -`clusterctl alpha topology plan` can be used to render objects of a managed topology without having to create or update |
124 |
| -a Cluster or a ClusterClass in Kubernetes. For more details please see: [clusterctl alpha topology plan]. |
| 122 | +The `clusterctl alpha topology plan` command can be used to test ClusterClasses; the output will show |
| 123 | +you how the resulting Cluster will look like, but without actually creating it. |
| 124 | +For more details please see: [clusterctl alpha topology plan]. |
125 | 125 |
|
126 | 126 | </aside>
|
127 | 127 |
|
@@ -243,7 +243,8 @@ spec:
|
243 | 243 |
|
244 | 244 | **Setting variable values in the Cluster**
|
245 | 245 |
|
246 |
| -The user can now provide a value for the variable in the Cluster. |
| 246 | +After creating a ClusterClass with a variable definition, the user can now provide a value for |
| 247 | +the variable in the Cluster as in the example below. |
247 | 248 |
|
248 | 249 | ```yaml
|
249 | 250 | apiVersion: cluster.x-k8s.io/v1beta1
|
|
0 commit comments