@@ -81,6 +81,17 @@ type ClusterClass struct {
81
81
82
82
// ClusterClassSpec describes the desired state of the ClusterClass.
83
83
type 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
+
84
95
// infrastructure is a reference to a provider-specific template that holds
85
96
// the details for provisioning infrastructure specific cluster
86
97
// for the underlying provider.
@@ -165,6 +176,22 @@ type ControlPlaneClass struct {
165
176
// NOTE: This value can be overridden while defining a Cluster.Topology.
166
177
// +optional
167
178
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"`
168
195
}
169
196
170
197
// ControlPlaneClassNamingStrategy defines the naming strategy for control plane objects.
@@ -250,6 +277,20 @@ type MachineDeploymentClass struct {
250
277
// NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.
251
278
MinReadySeconds * int32 `json:"minReadySeconds,omitempty"`
252
279
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
+
253
294
// strategy is the deployment strategy to use to replace existing machines with
254
295
// new ones.
255
296
// NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.
0 commit comments