@@ -288,12 +288,12 @@ type FooControlPlaneStatus struct {
288288 // +optional
289289 Selector string ` json:"selector,omitempty"`
290290
291- // replicas is the total number of non-terminated machines targeted by this control plane
291+ // replicas is the total number of machines targeted by this control plane
292292 // (their labels match the selector).
293293 // +optional
294294 Replicas int32 ` json:"replicas"`
295295
296- // updatedReplicas is the total number of non-terminated machines targeted by this control plane
296+ // updatedReplicas is the total number of machines targeted by this control plane
297297 // that have the desired template spec.
298298 // +optional
299299 UpdatedReplicas int32 ` json:"updatedReplicas"`
@@ -348,25 +348,25 @@ type FooControlPlaneStatus struct {
348348 // +optional
349349 Selector string `json:"selector,omitempty"`
350350
351- // replicas is the total number of non-terminated machines targeted by this control plane
351+ // replicas is the total number of machines targeted by this control plane
352352 // (their labels match the selector).
353353 // +optional
354- Replicas int32 `json:"replicas"`
354+ Replicas * int32 `json:"replicas,omitempty "`
355355
356356 // readyReplicas is the number of ready replicas for this ControlPlane. A machine is considered ready when Machine's Ready condition is true.
357357 // +optional
358- ReadyReplicas int32 `json:"readyReplicas"`
358+ ReadyReplicas * int32 `json:"readyReplicas,omitempty "`
359359
360360 // availableReplicas is the number of available replicas for this ControlPlane. A machine is considered available when Machine's Available condition is true.
361361 // +optional
362- AvailableReplicas int32 `json:"availableReplicas"`
362+ AvailableReplicas * int32 `json:"availableReplicas,omitempty "`
363363
364364 // upToDateReplicas is the number of up-to-date replicas targeted by this ControlPlane. A machine is considered available when Machine's UpToDate condition is true.
365365 // +optional
366- UpToDateReplicas int32 `json:"upToDateReplicas"`
366+ UpToDateReplicas * int32 `json:"upToDateReplicas,omitempty "`
367367
368368 // See other rules for more details about mandatory/optional fields in ControlPlane status.
369- // Other fields SHOULD be added based on the needs of your provider.
369+ // Other fields SHOULD be added based on the needs of your provider.
370370}
371371```
372372
@@ -568,17 +568,21 @@ Other fields will be ignored.
568568Additional considerations apply specifically to the ControlPlane resource:
569569
570570In order to disambiguate the usage of the ready term and improve how the status of the control plane is
571- presented, Cluster API will stop surfacing the ` Ready ` condition and instead surface a new ` Available ` condition.
571+ presented, Cluster API will stop surfacing the ` Ready ` condition and instead it will surface a new ` Available ` condition
572+ read from control plane resources.
572573
573574The ` Available ` condition is expected to properly represents the fact that a ControlPlane can be operational
574575even if there is a certain degree of not readiness / disruption in the system, or if lifecycle operations are happening.
575576
576577Last, but not least, in order to ensure a consistent users experience, it is also recommended to consider aligning also other
577578ControlPlane conditions to conditions existing on other Cluster API objects.
578579
579- For example ` KubeadmControlPlane ` is implements following conditions on top of the ` Available ` defined by this contract:
580+ For example ` KubeadmControlPlane ` is going to implement following conditions on top of the ` Available ` defined by this contract:
580581` CertificatesAvailable ` , ` EtcdClusterAvailable ` , ` MachinesReady ` , ` MachinesUpToDate ` , ` ScalingUp ` , ` ScalingDown ` , ` Remediating ` , ` Deleting ` , ` Paused ` .
581582
583+ Most notably, the Cluster controller is going to read ` ScalingUp ` , ` ScalingDown ` conditions, if existing, and use
584+ them to compute a Cluster level ` ScalingUp ` , ` ScalingDown ` condition including all the scalable resources.
585+
582586See [ Improving status in CAPI resources] for more context.
583587
584588Please also note that provider that will continue to use legacy Cluster API condition types MUST carefully take into account
0 commit comments