@@ -81,6 +81,17 @@ type ClusterClass struct {
8181
8282// ClusterClassSpec describes the desired state of the ClusterClass.
8383type ClusterClassSpec struct {
84+ // availabilityGates specifies additional conditions to include when evaluating Cluster Available condition.
85+ //
86+ // NOTE: this field is considered only for computing v1beta2 conditions.
87+ // NOTE: If a Cluster is using this ClusterClass, and this Cluster defines a custom list of availabilityGates,
88+ // such list overrides availabilityGates defined in this field.
89+ // +optional
90+ // +listType=map
91+ // +listMapKey=conditionType
92+ // +kubebuilder:validation:MaxItems=32
93+ AvailabilityGates []ClusterAvailabilityGate `json:"availabilityGates,omitempty"`
94+
8495 // infrastructure is a reference to a provider-specific template that holds
8596 // the details for provisioning infrastructure specific cluster
8697 // for the underlying provider.
@@ -165,6 +176,22 @@ type ControlPlaneClass struct {
165176 // NOTE: This value can be overridden while defining a Cluster.Topology.
166177 // +optional
167178 NodeDeletionTimeout * metav1.Duration `json:"nodeDeletionTimeout,omitempty"`
179+
180+ // readinessGates specifies additional conditions to include when evaluating Machine Ready condition.
181+ //
182+ // This field can be used e.g. to instruct the machine controller to include in the computation for Machine's ready
183+ // computation a condition, managed by an external controllers, reporting the status of special software/hardware installed on the Machine.
184+ //
185+ // NOTE: This field is considered only for computing v1beta2 conditions.
186+ // NOTE: If a Cluster defines a custom list of readinessGates for the control plane,
187+ // such list overrides readinessGates defined in this field.
188+ // NOTE: Specific control plane provider implementations might automatically extend the list of readinessGates;
189+ // e.g. the kubeadm control provider adds ReadinessGates for the APIServerPodHealthy, SchedulerPodHealthy conditions, etc.
190+ // +optional
191+ // +listType=map
192+ // +listMapKey=conditionType
193+ // +kubebuilder:validation:MaxItems=32
194+ ReadinessGates []MachineReadinessGate `json:"readinessGates,omitempty"`
168195}
169196
170197// ControlPlaneClassNamingStrategy defines the naming strategy for control plane objects.
@@ -250,6 +277,20 @@ type MachineDeploymentClass struct {
250277 // NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.
251278 MinReadySeconds * int32 `json:"minReadySeconds,omitempty"`
252279
280+ // readinessGates specifies additional conditions to include when evaluating Machine Ready condition.
281+ //
282+ // This field can be used e.g. to instruct the machine controller to include in the computation for Machine's ready
283+ // computation a condition, managed by an external controllers, reporting the status of special software/hardware installed on the Machine.
284+ //
285+ // NOTE: This field is considered only for computing v1beta2 conditions.
286+ // NOTE: If a Cluster defines a custom list of readinessGates for a MachineDeployment using this MachineDeploymentClass,
287+ // such list overrides readinessGates defined in this field.
288+ // +optional
289+ // +listType=map
290+ // +listMapKey=conditionType
291+ // +kubebuilder:validation:MaxItems=32
292+ ReadinessGates []MachineReadinessGate `json:"readinessGates,omitempty"`
293+
253294 // strategy is the deployment strategy to use to replace existing machines with
254295 // new ones.
255296 // NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.
0 commit comments