Skip to content

Commit

Permalink
fix: Use actual weight from status field on rollout object
Browse files Browse the repository at this point in the history
This fixes #1812 by pulling the actual weight from the status field instead
of the SetWeight.

Signed-off-by: zachaller <[email protected]>
  • Loading branch information
zachaller committed Mar 28, 2022
1 parent 55a041a commit 39b0fca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/kubectl-argo-rollouts/info/rollout_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ func NewRolloutInfo(
}
}
} else {
roInfo.ActualWeight = roInfo.SetWeight
if ro.Status.Canary.Weights != nil {
roInfo.ActualWeight = fmt.Sprintf("%d", ro.Status.Canary.Weights.Canary.Weight)
} else {
roInfo.ActualWeight = "n/a"
}
}
}
} else if ro.Spec.Strategy.BlueGreen != nil {
Expand Down

0 comments on commit 39b0fca

Please sign in to comment.