kubernetes-sigs/cluster-api

Topology should validate failureDomain before creating MachineDeployments

Open

#5,859 opened on Dec 14, 2021

View on GitHub
 (8 comments) (0 reactions) (0 assignees)Go (1,532 forks)auto 404
area/clusterclasshelp wantedkind/featurepriority/important-longtermtriage/accepted

Repository metrics

Stars
 (4,267 stars)
PR merge metrics
 (PR metrics pending)

Description

User Story

As a user, I would like to have validation on failureDomain value selected for my MachineDeployments

Detailed Description

This is a follow up of https://github.com/kubernetes-sigs/cluster-api/pull/5850#discussion_r767892624

https://github.com/kubernetes-sigs/cluster-api/pull/5850 introduced the possibility to spread MachineDeployments across failureDomains, however, on creation it is not possible to validate the selected failureDomain matches one of the available failureDomains, given that they are derived from the InfrastructureCluster after Cluster creation.

So this issue is about discussing options to ensure that a MachineDeployment gets created only if the corresponding failureDomain exists.

Option 1. We should wait to create a MachineDeployment until available failureDomains are reported on the Cluster.Status, providing evidence of this in the TopologyReconciled conditions. If the required failureDomain does not match any available failureDomains, this is a reconcile error.

Option 2. If the available failureDomains are reported on the Cluster.Status, we should validate failureDomain for new MachineDeployments/edited MachineDeployments upfront.

Option 1 and 2 are not exclusive

/kind feature /area topology /milestone v1.1

Contributor guide