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

Commit

Permalink
Check for NodeSetDeploymentReadyCondition in deploymentStatuses
Browse files Browse the repository at this point in the history
DeploymentStatuses never get the final Ready condition. Check
for NodeSetDeploymentReadyCondition which we set explicitly.

Also we should not wait for the whole deployment that could have
multiple nodesets to be ready. We're concerned about a specific
nodeset here.
  • Loading branch information
rabi committed Apr 26, 2024
1 parent f9f807b commit 3c929f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/v1beta1/openstackdataplanenodeset_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ func (r *OpenStackDataPlaneNodeSet) ValidateUpdate(old runtime.Object) (admissio
}
if oldNodeSet.Status.DeploymentStatuses != nil {
for _, deployConditions := range oldNodeSet.Status.DeploymentStatuses {
deployCondition := deployConditions.Get(condition.ReadyCondition)
if !deployConditions.IsTrue(condition.ReadyCondition) && !condition.IsError(deployCondition) {
deployCondition := deployConditions.Get(NodeSetDeploymentReadyCondition)
if !deployConditions.IsTrue(NodeSetDeploymentReadyCondition) && !condition.IsError(deployCondition) {
return nil, apierrors.NewConflict(
schema.GroupResource{Group: "dataplane.openstack.org", Resource: "OpenStackDataPlaneNodeSet"},
r.Name,
Expand Down

0 comments on commit 3c929f9

Please sign in to comment.