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

Commit

Permalink
Merge pull request #761 from fao89/nsstatus
Browse files Browse the repository at this point in the history
Update nodeSet status on deployment error
  • Loading branch information
openshift-merge-bot[bot] authored Mar 14, 2024
2 parents eb3e7a5 + ad7956d commit f31526e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 4 additions & 1 deletion controllers/openstackdataplanenodeset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,13 @@ func checkDeployment(helper *helper.Helper,
instance.Status.DeploymentStatuses = make(map[string]condition.Conditions)
}
instance.Status.DeploymentStatuses[deployment.Name] = deploymentConditions
if condition.IsError(deployment.Status.Conditions.Get(condition.ReadyCondition)) {
err = fmt.Errorf("check deploymentStatuses for more details")
}
}
}

return deploymentExists, isDeploymentReady, nil
return deploymentExists, isDeploymentReady, err
}

// SetupWithManager sets up the controller with the Manager.
Expand Down
10 changes: 6 additions & 4 deletions tests/kuttl/tests/dataplane-deploy-no-nodes-test/05-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ spec:
ansibleSSHPrivateKeySecret: dataplane-ansible-ssh-private-key-secret
status:
conditions:
- message: Deployment in progress
reason: Requested
- message: Deployment error occurred check deploymentStatuses for more details
reason: Error
severity: Error
status: "False"
type: Ready
- message: Deployment in progress
reason: Requested
- message: Deployment error occurred check deploymentStatuses for more details
reason: Error
severity: Error
status: "False"
type: DeploymentReady
- message: Input data complete
Expand Down

0 comments on commit f31526e

Please sign in to comment.