Skip to content

Commit

Permalink
update TopologyRecondition condition message wording
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuvaraj Kakaraparthi committed May 16, 2023
1 parent 6b2f3a1 commit b15064d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions internal/controllers/topology/cluster/conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ func (r *Reconciler) reconcileTopologyReconciledCondition(s *scope.Scope, cluste

switch {
case s.UpgradeTracker.ControlPlane.PendingUpgrade:
fmt.Fprintf(msgBuilder, "Control plane upgrade to %s on hold.", s.Blueprint.Topology.Version)
fmt.Fprintf(msgBuilder, "Control plane update to version %s changes on hold.", s.Blueprint.Topology.Version)
reason = clusterv1.TopologyReconciledControlPlaneUpgradePendingReason
case s.UpgradeTracker.MachineDeployments.PendingUpgrade():
fmt.Fprintf(msgBuilder, "MachineDeployment(s) %s upgrade to version %s on hold.",
fmt.Fprintf(msgBuilder, "MachineDeployment(s) %s update to version %s changes on hold.",
computeMachineDeploymentNameList(s.UpgradeTracker.MachineDeployments.PendingUpgradeNames()),
s.Blueprint.Topology.Version,
)
Expand Down
14 changes: 7 additions & 7 deletions internal/controllers/topology/cluster/conditions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func TestReconcileTopologyReconciledCondition(t *testing.T) {
},
wantConditionStatus: corev1.ConditionFalse,
wantConditionReason: clusterv1.TopologyReconciledControlPlaneUpgradePendingReason,
wantConditionMessage: "Control plane upgrade to v1.22.0 on hold. Control plane is completing initial provisioning",
wantConditionMessage: "Control plane update to version v1.22.0 changes on hold. Control plane is completing initial provisioning",
},
{
name: "should set the condition to false if new version is not picked up because control plane is upgrading",
Expand Down Expand Up @@ -161,7 +161,7 @@ func TestReconcileTopologyReconciledCondition(t *testing.T) {
},
wantConditionStatus: corev1.ConditionFalse,
wantConditionReason: clusterv1.TopologyReconciledControlPlaneUpgradePendingReason,
wantConditionMessage: "Control plane upgrade to v1.22.0 on hold. Control plane is upgrading to version v1.21.2",
wantConditionMessage: "Control plane update to version v1.22.0 changes on hold. Control plane is upgrading to version v1.21.2",
},
{
name: "should set the condition to false if new version is not picked up because control plane is scaling",
Expand Down Expand Up @@ -192,7 +192,7 @@ func TestReconcileTopologyReconciledCondition(t *testing.T) {
},
wantConditionStatus: corev1.ConditionFalse,
wantConditionReason: clusterv1.TopologyReconciledControlPlaneUpgradePendingReason,
wantConditionMessage: "Control plane upgrade to v1.22.0 on hold. Control plane is reconciling desired replicas",
wantConditionMessage: "Control plane update to version v1.22.0 changes on hold. Control plane is reconciling desired replicas",
},
{
name: "should set the condition to false if new version is not picked up because at least one of the machine deployment is rolling out",
Expand Down Expand Up @@ -237,7 +237,7 @@ func TestReconcileTopologyReconciledCondition(t *testing.T) {
},
wantConditionStatus: corev1.ConditionFalse,
wantConditionReason: clusterv1.TopologyReconciledControlPlaneUpgradePendingReason,
wantConditionMessage: "Control plane upgrade to v1.22.0 on hold. MachineDeployment(s) md0-abc123 are rolling out",
wantConditionMessage: "Control plane update to version v1.22.0 changes on hold. MachineDeployment(s) md0-abc123 are rolling out",
},
{
name: "should set the condition to false if control plane picked the new version but machine deployments did not because control plane is upgrading",
Expand Down Expand Up @@ -283,7 +283,7 @@ func TestReconcileTopologyReconciledCondition(t *testing.T) {
},
wantConditionStatus: corev1.ConditionFalse,
wantConditionReason: clusterv1.TopologyReconciledMachineDeploymentsUpgradePendingReason,
wantConditionMessage: "MachineDeployment(s) md0-abc123 upgrade to version v1.22.0 on hold. Control plane is upgrading to version v1.22.0",
wantConditionMessage: "MachineDeployment(s) md0-abc123 update to version v1.22.0 changes on hold. Control plane is upgrading to version v1.22.0",
},
{
name: "should set the condition to false if control plane picked the new version but machine deployments did not because control plane is scaling",
Expand Down Expand Up @@ -329,7 +329,7 @@ func TestReconcileTopologyReconciledCondition(t *testing.T) {
},
wantConditionStatus: corev1.ConditionFalse,
wantConditionReason: clusterv1.TopologyReconciledMachineDeploymentsUpgradePendingReason,
wantConditionMessage: "MachineDeployment(s) md0-abc123 upgrade to version v1.22.0 on hold. Control plane is reconciling desired replicas",
wantConditionMessage: "MachineDeployment(s) md0-abc123 update to version v1.22.0 changes on hold. Control plane is reconciling desired replicas",
},
{
name: "should set the condition to true if control plane picked the new version and is upgrading but there are no machine deployments",
Expand Down Expand Up @@ -468,7 +468,7 @@ func TestReconcileTopologyReconciledCondition(t *testing.T) {
},
wantConditionStatus: corev1.ConditionFalse,
wantConditionReason: clusterv1.TopologyReconciledMachineDeploymentsUpgradePendingReason,
wantConditionMessage: "MachineDeployment(s) md1-abc123 upgrade to version v1.22.0 on hold. MachineDeployment(s) md0-abc123 are upgrading",
wantConditionMessage: "MachineDeployment(s) md1-abc123 update to version v1.22.0 changes on hold. MachineDeployment(s) md0-abc123 are upgrading",
},
{
name: "should set the condition to false if some machine deployments have not picked the new version because their upgrade has been deferred",
Expand Down

0 comments on commit b15064d

Please sign in to comment.