Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Use the error message from deployment for NodeSetDeploymentReadyCondi…
Browse files Browse the repository at this point in the history
…tion

We don't need the hack for the message as we can use the message
from the deployment directly.

Depends-On: openstack-k8s-operators/install_yamls#847
Signed-off-by: rabi <[email protected]>
  • Loading branch information
rabi committed Jun 12, 2024
1 parent f057a68 commit 733bc81
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions controllers/openstackdataplanenodeset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,6 @@ func (r *OpenStackDataPlaneNodeSetReconciler) Reconcile(ctx context.Context, req
}
instance.Status.Conditions.MarkFalse(condition.DeploymentReadyCondition,
condition.ErrorReason, condition.SeverityError,
condition.DeploymentReadyErrorMessage,
deployErrorMsg)
}

Expand Down Expand Up @@ -498,8 +497,7 @@ func checkDeployment(helper *helper.Helper,
instance.Status.DeploymentStatuses[deployment.Name] = deploymentConditions
deploymentCondition := deploymentConditions.Get(dataplanev1.NodeSetDeploymentReadyCondition)
if condition.IsError(deploymentCondition) {
msg := strings.Replace(deploymentCondition.Message, strings.Split(condition.DeploymentReadyErrorMessage, "%")[0], "", -1)
err = fmt.Errorf(msg)
err = fmt.Errorf(deploymentCondition.Message)
isDeploymentFailed = true
break
} else if deploymentConditions.IsFalse(dataplanev1.NodeSetDeploymentReadyCondition) {
Expand Down

0 comments on commit 733bc81

Please sign in to comment.