Skip to content

Commit

Permalink
machinedeployment: preserve v1beta2 status
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischdi committed Oct 15, 2024
1 parent 93fc3fd commit 30e7aaa
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,9 @@ func calculateStatus(allMSs []*clusterv1.MachineSet, newMS *clusterv1.MachineSet
AvailableReplicas: availableReplicas,
UnavailableReplicas: unavailableReplicas,
Conditions: deployment.Status.Conditions,

// preserve v1beta2 status
V1Beta2: deployment.Status.V1Beta2,
}

if *deployment.Spec.Replicas == status.ReadyReplicas {
Expand Down

1 comment on commit 30e7aaa

@chrischdi
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: in the code here we overwrite the full status struct.

For v1beta2 status we want to preserve it and always write it at the end. Otherwise we would have infinite reconciles.

Please sign in to comment.