@@ -288,12 +288,12 @@ type FooControlPlaneStatus struct {
288
288
// +optional
289
289
Selector string ` json:"selector,omitempty"`
290
290
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
292
292
// (their labels match the selector).
293
293
// +optional
294
294
Replicas int32 ` json:"replicas"`
295
295
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
297
297
// that have the desired template spec.
298
298
// +optional
299
299
UpdatedReplicas int32 ` json:"updatedReplicas"`
@@ -348,25 +348,25 @@ type FooControlPlaneStatus struct {
348
348
// +optional
349
349
Selector string `json:"selector,omitempty"`
350
350
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
352
352
// (their labels match the selector).
353
353
// +optional
354
- Replicas int32 `json:"replicas"`
354
+ Replicas * int32 `json:"replicas,omitempty "`
355
355
356
356
// readyReplicas is the number of ready replicas for this ControlPlane. A machine is considered ready when Machine's Ready condition is true.
357
357
// +optional
358
- ReadyReplicas int32 `json:"readyReplicas"`
358
+ ReadyReplicas * int32 `json:"readyReplicas,omitempty "`
359
359
360
360
// availableReplicas is the number of available replicas for this ControlPlane. A machine is considered available when Machine's Available condition is true.
361
361
// +optional
362
- AvailableReplicas int32 `json:"availableReplicas"`
362
+ AvailableReplicas * int32 `json:"availableReplicas,omitempty "`
363
363
364
364
// 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.
365
365
// +optional
366
- UpToDateReplicas int32 `json:"upToDateReplicas"`
366
+ UpToDateReplicas * int32 `json:"upToDateReplicas,omitempty "`
367
367
368
368
// 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.
370
370
}
371
371
```
372
372
@@ -568,17 +568,21 @@ Other fields will be ignored.
568
568
Additional considerations apply specifically to the ControlPlane resource:
569
569
570
570
In 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.
572
573
573
574
The ` Available ` condition is expected to properly represents the fact that a ControlPlane can be operational
574
575
even if there is a certain degree of not readiness / disruption in the system, or if lifecycle operations are happening.
575
576
576
577
Last, but not least, in order to ensure a consistent users experience, it is also recommended to consider aligning also other
577
578
ControlPlane conditions to conditions existing on other Cluster API objects.
578
579
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:
580
581
` CertificatesAvailable ` , ` EtcdClusterAvailable ` , ` MachinesReady ` , ` MachinesUpToDate ` , ` ScalingUp ` , ` ScalingDown ` , ` Remediating ` , ` Deleting ` , ` Paused ` .
581
582
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
+
582
586
See [ Improving status in CAPI resources] for more context.
583
587
584
588
Please also note that provider that will continue to use legacy Cluster API condition types MUST carefully take into account
0 commit comments