Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischdi committed Nov 21, 2024
1 parent 252c757 commit fedf8c4
Show file tree
Hide file tree
Showing 5 changed files with 368 additions and 238 deletions.
60 changes: 30 additions & 30 deletions api/v1beta1/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,92 +223,92 @@ const (

// Cluster's ControlPlaneMachinesReady condition and corresponding reasons that will be used in v1Beta2 API version.
const (
// ClusterControlPlaneMachinesReadyV1Beta2Condition surfaces detail of issues on the controlled machines, if any.
// ClusterControlPlaneMachinesReadyV1Beta2Condition surfaces detail of issues on control plane machines, if any.
ClusterControlPlaneMachinesReadyV1Beta2Condition = "ControlPlaneMachinesReady"

// ClusterControlPlaneMachinesReadyV1Beta2Reason surfaces when all the controlled machine's Ready conditions are true.
// ClusterControlPlaneMachinesReadyV1Beta2Reason surfaces when all control plane machine's Ready conditions are true.
ClusterControlPlaneMachinesReadyV1Beta2Reason = ReadyV1Beta2Reason

// ClusterControlPlaneMachinesNotReadyV1Beta2Reason surfaces when at least one of the controlled machine's Ready conditions is false.
// ClusterControlPlaneMachinesNotReadyV1Beta2Reason surfaces when at least one of control plane machine's Ready conditions is false.
ClusterControlPlaneMachinesNotReadyV1Beta2Reason = NotReadyV1Beta2Reason

// ClusterControlPlaneMachinesReadyUnknownV1Beta2Reason surfaces when at least one of the controlled machine's Ready conditions is unknown
// and none of the controlled machine's Ready conditions is false.
// ClusterControlPlaneMachinesReadyUnknownV1Beta2Reason surfaces when at least one of control plane machine's Ready conditions is unknown
// and none of control plane machine's Ready conditions is false.
ClusterControlPlaneMachinesReadyUnknownV1Beta2Reason = ReadyUnknownV1Beta2Reason

// ClusterControlPlaneMachinesReadyNoReplicasV1Beta2Reason surfaces when no machines exist for the Cluster.
// ClusterControlPlaneMachinesReadyNoReplicasV1Beta2Reason surfaces when no control plane machines exist for the Cluster.
ClusterControlPlaneMachinesReadyNoReplicasV1Beta2Reason = NoReplicasV1Beta2Reason

// ClusterControlPlaneMachinesReadyInternalErrorV1Beta2Reason surfaces unexpected failures when listing machines
// or aggregating machine's conditions.
// ClusterControlPlaneMachinesReadyInternalErrorV1Beta2Reason surfaces unexpected failures when listing control plane machines
// or aggregating control plane machine's conditions.
ClusterControlPlaneMachinesReadyInternalErrorV1Beta2Reason = InternalErrorV1Beta2Reason
)

// Cluster's WorkerMachinesReady condition and corresponding reasons that will be used in v1Beta2 API version.
const (
// ClusterWorkerMachinesReadyV1Beta2Condition surfaces detail of issues on the controlled machines, if any.
// ClusterWorkerMachinesReadyV1Beta2Condition surfaces detail of issues on the worker machines, if any.
ClusterWorkerMachinesReadyV1Beta2Condition = "WorkerMachinesReady"

// ClusterWorkerMachinesReadyV1Beta2Reason surfaces when all the controlled machine's Ready conditions are true.
// ClusterWorkerMachinesReadyV1Beta2Reason surfaces when all the worker machine's Ready conditions are true.
ClusterWorkerMachinesReadyV1Beta2Reason = ReadyV1Beta2Reason

// ClusterWorkerMachinesNotReadyV1Beta2Reason surfaces when at least one of the controlled machine's Ready conditions is false.
// ClusterWorkerMachinesNotReadyV1Beta2Reason surfaces when at least one of the worker machine's Ready conditions is false.
ClusterWorkerMachinesNotReadyV1Beta2Reason = NotReadyV1Beta2Reason

// ClusterWorkerMachinesReadyUnknownV1Beta2Reason surfaces when at least one of the controlled machine's Ready conditions is unknown
// and none of the controlled machine's Ready conditions is false.
// ClusterWorkerMachinesReadyUnknownV1Beta2Reason surfaces when at least one of the worker machine's Ready conditions is unknown
// and none of the worker machine's Ready conditions is false.
ClusterWorkerMachinesReadyUnknownV1Beta2Reason = ReadyUnknownV1Beta2Reason

// ClusterWorkerMachinesReadyNoReplicasV1Beta2Reason surfaces when no machines exist for the Cluster.
// ClusterWorkerMachinesReadyNoReplicasV1Beta2Reason surfaces when no worker machines exist for the Cluster.
ClusterWorkerMachinesReadyNoReplicasV1Beta2Reason = NoReplicasV1Beta2Reason

// ClusterWorkerMachinesReadyInternalErrorV1Beta2Reason surfaces unexpected failures when listing machines
// or aggregating machine's conditions.
// ClusterWorkerMachinesReadyInternalErrorV1Beta2Reason surfaces unexpected failures when listing worker machines
// or aggregating worker machine's conditions.
ClusterWorkerMachinesReadyInternalErrorV1Beta2Reason = InternalErrorV1Beta2Reason
)

// Cluster's ControlPlaneMachinesUpToDate condition and corresponding reasons that will be used in v1Beta2 API version.
const (
// ClusterControlPlaneMachinesUpToDateV1Beta2Condition surfaces details of Cluster's machines not up to date, if any.
// ClusterControlPlaneMachinesUpToDateV1Beta2Condition surfaces details of control plane machines not up to date, if any.
ClusterControlPlaneMachinesUpToDateV1Beta2Condition = "ControlPlaneMachinesUpToDate"

// ClusterControlPlaneMachinesUpToDateV1Beta2Reason surfaces when all the controlled machine's UpToDate conditions are true.
// ClusterControlPlaneMachinesUpToDateV1Beta2Reason surfaces when all the control plane machine's UpToDate conditions are true.
ClusterControlPlaneMachinesUpToDateV1Beta2Reason = UpToDateV1Beta2Reason

// ClusterControlPlaneMachinesNotUpToDateV1Beta2Reason surfaces when at least one of the controlled machine's UpToDate conditions is false.
// ClusterControlPlaneMachinesNotUpToDateV1Beta2Reason surfaces when at least one of the control plane machine's UpToDate conditions is false.
ClusterControlPlaneMachinesNotUpToDateV1Beta2Reason = NotUpToDateV1Beta2Reason

// ClusterControlPlaneMachinesUpToDateUnknownV1Beta2Reason surfaces when at least one of the controlled machine's UpToDate conditions is unknown
// and none of the controlled machine's UpToDate conditions is false.
// ClusterControlPlaneMachinesUpToDateUnknownV1Beta2Reason surfaces when at least one of the control plane machine's UpToDate conditions is unknown
// and none of the control plane machine's UpToDate conditions is false.
ClusterControlPlaneMachinesUpToDateUnknownV1Beta2Reason = UpToDateUnknownV1Beta2Reason

// ClusterControlPlaneMachinesUpToDateNoReplicasV1Beta2Reason surfaces when no machines exist for the Cluster.
// ClusterControlPlaneMachinesUpToDateNoReplicasV1Beta2Reason surfaces when no control plane machines exist for the Cluster.
ClusterControlPlaneMachinesUpToDateNoReplicasV1Beta2Reason = NoReplicasV1Beta2Reason

// ClusterControlPlaneMachinesUpToDateInternalErrorV1Beta2Reason surfaces unexpected failures when listing machines
// ClusterControlPlaneMachinesUpToDateInternalErrorV1Beta2Reason surfaces unexpected failures when listing control plane machines
// or aggregating status.
ClusterControlPlaneMachinesUpToDateInternalErrorV1Beta2Reason = InternalErrorV1Beta2Reason
)

// Cluster's WorkerMachinesUpToDate condition and corresponding reasons that will be used in v1Beta2 API version.
const (
// ClusterWorkerMachinesUpToDateV1Beta2Condition surfaces details of Cluster's machines not up to date, if any.
// ClusterWorkerMachinesUpToDateV1Beta2Condition surfaces details of worker machines not up to date, if any.
ClusterWorkerMachinesUpToDateV1Beta2Condition = "WorkerMachinesUpToDate"

// ClusterWorkerMachinesUpToDateV1Beta2Reason surfaces when all the controlled machine's UpToDate conditions are true.
// ClusterWorkerMachinesUpToDateV1Beta2Reason surfaces when all the worker machine's UpToDate conditions are true.
ClusterWorkerMachinesUpToDateV1Beta2Reason = UpToDateV1Beta2Reason

// ClusterWorkerMachinesNotUpToDateV1Beta2Reason surfaces when at least one of the controlled machine's UpToDate conditions is false.
// ClusterWorkerMachinesNotUpToDateV1Beta2Reason surfaces when at least one of the worker machine's UpToDate conditions is false.
ClusterWorkerMachinesNotUpToDateV1Beta2Reason = NotUpToDateV1Beta2Reason

// ClusterWorkerMachinesUpToDateUnknownV1Beta2Reason surfaces when at least one of the controlled machine's UpToDate conditions is unknown
// and none of the controlled machine's UpToDate conditions is false.
// ClusterWorkerMachinesUpToDateUnknownV1Beta2Reason surfaces when at least one of the worker machine's UpToDate conditions is unknown
// and none of the worker machine's UpToDate conditions is false.
ClusterWorkerMachinesUpToDateUnknownV1Beta2Reason = UpToDateUnknownV1Beta2Reason

// ClusterWorkerMachinesUpToDateNoReplicasV1Beta2Reason surfaces when no machines exist for the Cluster.
// ClusterWorkerMachinesUpToDateNoReplicasV1Beta2Reason surfaces when no worker machines exist for the Cluster.
ClusterWorkerMachinesUpToDateNoReplicasV1Beta2Reason = NoReplicasV1Beta2Reason

// ClusterWorkerMachinesUpToDateInternalErrorV1Beta2Reason surfaces unexpected failures when listing machines
// ClusterWorkerMachinesUpToDateInternalErrorV1Beta2Reason surfaces unexpected failures when listing worker machines
// or aggregating status.
ClusterWorkerMachinesUpToDateInternalErrorV1Beta2Reason = InternalErrorV1Beta2Reason
)
Expand Down
4 changes: 2 additions & 2 deletions internal/controllers/cluster/cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ func patchCluster(ctx context.Context, patchHelper *patch.Helper, cluster *clust
clusterv1.ClusterInfrastructureReadyV1Beta2Condition,
clusterv1.ClusterControlPlaneAvailableV1Beta2Condition,
clusterv1.ClusterControlPlaneInitializedV1Beta2Condition,
clusterv1.ClusterWorkersAvailableV1Beta2Condition,
clusterv1.ClusterControlPlaneMachinesReadyV1Beta2Condition,
clusterv1.ClusterWorkerMachinesReadyV1Beta2Condition,
clusterv1.ClusterControlPlaneMachinesUpToDateV1Beta2Condition,
clusterv1.ClusterWorkersAvailableV1Beta2Condition,
clusterv1.ClusterWorkerMachinesReadyV1Beta2Condition,
clusterv1.ClusterWorkerMachinesUpToDateV1Beta2Condition,
clusterv1.ClusterRemoteConnectionProbeV1Beta2Condition,
clusterv1.ClusterScalingUpV1Beta2Condition,
Expand Down
Loading

0 comments on commit fedf8c4

Please sign in to comment.