Skip to content

Commit dd8048c

Browse files
authored
Merge pull request #4985 from killianmuldoon/caep/update-clusterclass-with-rebase
📖 Add validation for ClusterClass compatibility
2 parents 3e54e8c + f17648e commit dd8048c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

docs/proposals/202105256-cluster-class-and-managed-topologies.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,12 +334,22 @@ type LocalObjectTemplate struct {
334334
- `spec.topology.workers.machineDeployments[i].name` field must be unique within a Cluster
335335

336336
- For object updates:
337-
- If `spec.topology.class` is set, it cannot be unset or modified.
337+
- If `spec.topology.class` is set it cannot be unset or modified, and if it's unset it cannot be set.
338338
- `spec.topology.version` cannot be unset and must be a valid semver, if being updated.
339339
- `spec.topology.version` cannot be downgraded.
340340
- `spec.topology.workers.machineDeployments[i].name` field must be unique within a Cluster
341341
- A set of worker nodes can be added to or removed from the `spec.topology.workers.machineDeployments` list.
342342
343+
##### ClusterClass compatibility
344+
There are cases where we must consider whether two ClusterClasses are compatible:
345+
1. Where a user chooses to replace an existing ClusterClass `cluster.spec.topology.class` with a new ClusterClass.
346+
2. Where a user updates a ClusterClass currently in use by a Cluster.
347+
348+
To establish compatibility between two ClusterClasses:
349+
- All the references must be in the same namespace of `metadata.Namespace` - the same namespace as the existing clusterClass.
350+
- `spec.workers.machineDeployments` must not remove any deployment classes (adding new or modifying existing classes is supported).
351+
- `spec.controlPlane.localobjecttemplate`, `spec.controlplane.machineinfrastructure`, `spec.infrastructure`, `spec.workers.machineDeployments[].template.infrastructure.ref` must not change apiGroup or Kind.
352+
343353
#### Behaviors
344354
This section lists out the behavior for Cluster objects using `ClusterClass` in case of creates and updates.
345355

0 commit comments

Comments
 (0)