Skip to content

Commit

Permalink
Merge pull request #11460 from fabriziopandini/small-improvements-to-…
Browse files Browse the repository at this point in the history
…status-proposal

📖 Small improvements to the v1beta2 status proposal
  • Loading branch information
k8s-ci-robot authored Nov 21, 2024
2 parents 2b6669b + e04e63e commit 91b87fb
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 19 deletions.
7 changes: 4 additions & 3 deletions docs/book/src/developer/providers/contracts/control-plane.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
38 changes: 22 additions & 16 deletions docs/proposals/20240916-improve-status-in-CAPI-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 |
Expand Down Expand Up @@ -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 |
Expand Down

0 comments on commit 91b87fb

Please sign in to comment.