Skip to content

Commit

Permalink
Fix SubnetPort status comparison (vmware-tanzu#1023)
Browse files Browse the repository at this point in the history
Signed-off-by: Yanjun Zhou <[email protected]>
  • Loading branch information
yanjunz97 authored Feb 17, 2025
1 parent 372154d commit be05ed3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controllers/subnetport/subnetport_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (r *SubnetPortReconciler) Reconcile(ctx context.Context, req ctrl.Request)
if err != nil {
log.Error(err, "failed to retrieve subnet status for subnetport", "subnetport", subnetPort, "nsxSubnetPath", nsxSubnetPath)
}
if reflect.DeepEqual(old_status, subnetPort.Status) {
if reflect.DeepEqual(*old_status, subnetPort.Status) {
log.Info("status (without conditions) already matched", "new status", subnetPort.Status, "existing status", old_status)
} else {
// If the SubnetPort CR's status changed, let's clean the conditions, to ensure the r.Client.Status().Update in the following updateSuccess will be invoked at any time.
Expand Down

0 comments on commit be05ed3

Please sign in to comment.