From e04e63ec0eb363cad6877fb80a4c07ab7dc891c8 Mon Sep 17 00:00:00 2001 From: fabriziopandini Date: Thu, 21 Nov 2024 09:36:10 +0100 Subject: [PATCH] Small improvements to the v1beta2 status proposal --- .../providers/contracts/control-plane.md | 7 ++-- ...240916-improve-status-in-CAPI-resources.md | 38 +++++++++++-------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/docs/book/src/developer/providers/contracts/control-plane.md b/docs/book/src/developer/providers/contracts/control-plane.md index c47df1a71661..82c3c57f1982 100644 --- a/docs/book/src/developer/providers/contracts/control-plane.md +++ b/docs/book/src/developer/providers/contracts/control-plane.md @@ -578,10 +578,11 @@ Last, but not least, in order to ensure a consistent users experience, it is als ControlPlane conditions to conditions existing on other Cluster API objects. For example `KubeadmControlPlane` is going to implement following conditions on top of the `Available` defined by this contract: -`CertificatesAvailable`, `EtcdClusterAvailable`, `MachinesReady`, `MachinesUpToDate`, `ScalingUp`, `ScalingDown`, `Remediating`, `Deleting`, `Paused`. +`CertificatesAvailable`, `EtcdClusterAvailable`, `MachinesReady`, `MachinesUpToDate`, `RollingOut`, `ScalingUp`, `ScalingDown`, +`Remediating`, `Deleting`, `Paused`. -Most notably, the Cluster controller is going to read `ScalingUp`, `ScalingDown` conditions, if existing, and use -them to compute a Cluster level `ScalingUp`, `ScalingDown` condition including all the scalable resources. +Most notably, If `RollingOut`, `ScalingUp`, `ScalingDown` conditions are implemented, the Cluster controller is going to read +them to compute a Cluster level `RollingOut`, `ScalingUp`, `ScalingDown` condition including all the scalable resources. See [Improving status in CAPI resources] for more context. diff --git a/docs/proposals/20240916-improve-status-in-CAPI-resources.md b/docs/proposals/20240916-improve-status-in-CAPI-resources.md index db0d526f3c86..8abc7cbea04c 100644 --- a/docs/proposals/20240916-improve-status-in-CAPI-resources.md +++ b/docs/proposals/20240916-improve-status-in-CAPI-resources.md @@ -661,6 +661,7 @@ Notes: | `Available` | True if the MachineDeployment is not deleted and it has minimum availability according to parameters specified in the deployment strategy, e.g. If using RollingUpgrade strategy, availableReplicas must be greater or equal than desired replicas - MaxUnavailable replicas | | `MachinesReady` | This condition surfaces detail of issues on the controlled machines, if any | | `MachinesUpToDate` | This condition surfaces details of controlled machines not up to date, if any | +| `RollingOut` | True if there is at least one machine not up to date | | `ScalingUp` | True if actual replicas < desired replicas | | `ScalingDown` | True if actual replicas > desired replicas | | `Remediating` | This condition surfaces details about ongoing remediation of the controlled machines, if any | @@ -854,22 +855,25 @@ Notes: ##### Cluster (New)Conditions -| Condition | Note | -|---------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `Available` | True if Cluster is not deleted, Cluster's `RemoteConnectionProbe`, `InfrastructureReady`, `ControlPlaneAvailable`, `WorkersAvailable`, `TopologyReconciled` (if present) conditions are true. if conditions are defined in `spec.availabilityGates`, those conditions must be true as well | -| `TopologyReconciled` | True if the topology controller is working properly | -| `InfrastructureReady` | Mirror of Cluster's infrastructure `Ready` condition | -| `ControlPlaneInitialized` | True when the Cluster's control plane is functional enough to accept requests. This information is usually used as a signal for starting all the provisioning operations that depends on a functional API server, but do not require a full HA control plane to exists | -| `ControlPlaneAvailable` | Mirror of Cluster's control plane `Available` condition | -| `WorkersAvailable` | Summary of MachineDeployment and MachinePool's `Available` conditions | -| `MachinesReady` | This condition surfaces detail of issues on the controlled machines, if any | -| `MachinesUpToDate` | This condition surfaces details of Cluster's machines not up to date, if any | -| `RemoteConnectionProbe` | True when control plane can be reached; in case of connection problems, the condition turns to false only if the the cluster cannot be reached for 50s after the first connection problem is detected (or whatever period is defined in the `--remote-connection-grace-period` flag) | -| `ScalingUp` | Summary of `ScalingUp` conditions from ControlPlane, MachineDeployments, MachinePools and stand-alone MachineSets | -| `ScalingDown` | Summary of `ScalingDown` conditions from ControlPlane, MachineDeployments, MachinePools and stand-alone MachineSets | -| `Remediating` | This condition surfaces details about ongoing remediation of the controlled machines, if any | -| `Deleting` | If Cluster is deleted, this condition surfaces details about ongoing deletion of the cluster | -| `Paused` | True if Cluster and all the resources being part of it are paused | +| Condition | Note | +|-------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `Available` | True if Cluster is not deleted, Cluster's `RemoteConnectionProbe`, `InfrastructureReady`, `ControlPlaneAvailable`, `WorkersAvailable`, `TopologyReconciled` (if present) conditions are true. if conditions are defined in `spec.availabilityGates`, those conditions must be true as well | +| `TopologyReconciled` | True if the topology controller is working properly | +| `InfrastructureReady` | Mirror of Cluster's infrastructure `Ready` condition | +| `ControlPlaneInitialized` | True when the Cluster's control plane is functional enough to accept requests. This information is usually used as a signal for starting all the provisioning operations that depends on a functional API server, but do not require a full HA control plane to exists | +| `ControlPlaneAvailable` | Mirror of Cluster's control plane `Available` condition | +| `ControlPlaneMachinesReady` | This condition surfaces detail of issues on control plane machines, if any | +| `ControlPlaneMachineUpToDate` | This condition surfaces details of control plane machines not up to date, if any | +| `WorkersAvailable` | Summary of MachineDeployment and MachinePool's `Available` conditions | +| `WorkerMachinesReady` | This condition surfaces detail of issues on the worker machines, if any | +| `WorkerMachinesUpToDate` | This condition surfaces details of worker machines not up to date, if any | +| `RemoteConnectionProbe` | True when control plane can be reached; in case of connection problems, the condition turns to false only if the the cluster cannot be reached for 50s after the first connection problem is detected (or whatever period is defined in the `--remote-connection-grace-period` flag) | +| `RollingOut` | Summary of `RollingOut` conditions from ControlPlane, MachineDeployments and MachinePools | +| `ScalingUp` | Summary of `ScalingUp` conditions from ControlPlane, MachineDeployments, MachinePools and stand-alone MachineSets | +| `ScalingDown` | Summary of `ScalingDown` conditions from ControlPlane, MachineDeployments, MachinePools and stand-alone MachineSets | +| `Remediating` | This condition surfaces details about ongoing remediation of the controlled machines, if any | +| `Deleting` | If Cluster is deleted, this condition surfaces details about ongoing deletion of the cluster | +| `Paused` | True if Cluster and all the resources being part of it are paused | > To better evaluate proposed changes, below you can find the list of current Cluster's conditions: > Ready, InfrastructureReady, ControlPlaneReady, ControlPlaneInitialized, TopologyReconciled @@ -1034,6 +1038,7 @@ Notes: | `ControlPlaneComponentsHealthy` | This condition surfaces issues to Kubernetes control plane components hosted on machines managed by this object. It is computed as aggregation of Machine's `APIServerPodHealthy`, `ControllerManagerPodHealthy`, `SchedulerPodHealthy`, `EtcdPodHealthy` conditions plus additional checks on control plane machines and nodes | | `MachinesReady` | This condition surfaces detail of issues on the controlled machines, if any. Please note this will include also `APIServerPodHealthy`, `ControllerManagerPodHealthy`, `SchedulerPodHealthy`, and if not using an external etcd also `EtcdPodHealthy`, `EtcdMemberHealthy` | | `MachinesUpToDate` | This condition surfaces details of controlled machines not up to date, if any | +| `RollingOut` | True if there is at least one machine not up to date | | `ScalingUp` | True if actual replicas < desired replicas | | `ScalingDown` | True if actual replicas > desired replicas | | `Remediating` | This condition surfaces details about ongoing remediation of the controlled machines, if any | @@ -1177,6 +1182,7 @@ Notes: | `InfrastructureReady` | Mirrors the corresponding condition from the MachinePool's Infrastructure resource | | `MachinesReady` | This condition surfaces detail of issues on the controlled machines, if any | | `MachinesUpToDate` | This condition surfaces details of controlled machines not up to date, if any | +| `RollingOut` | True if there is at least one machine not up to date | | `ScalingUp` | True if actual replicas < desired replicas | | `ScalingDown` | True if actual replicas > desired replicas | | `Remediating` | This condition surfaces details about ongoing remediation of the controlled machines, if any |