From d0210313fc5499bee99ee513c140a699fba9928d Mon Sep 17 00:00:00 2001 From: yunbo Date: Fri, 7 Jun 2024 17:44:02 +0800 Subject: [PATCH] traffic: nextStep Index default value from 0 to -1 Signed-off-by: yunbo --- api/v1beta1/rollout_types.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/v1beta1/rollout_types.go b/api/v1beta1/rollout_types.go index f8ab8fc4..2c37b908 100644 --- a/api/v1beta1/rollout_types.go +++ b/api/v1beta1/rollout_types.go @@ -99,8 +99,11 @@ func (r *RolloutStrategy) GetRollingStyle() RollingStyleType { // can be converted to v1beta1 Rollout with EnableExtraWorkloadForCanary set as true, even the // objectRef is cloneset (which doesn't support canary release) func IsRealPartition(rollout *Rollout) bool { + if rollout.Spec.Strategy.IsEmptyRelease() { + return false + } estimation := rollout.Spec.Strategy.GetRollingStyle() - if estimation == EmptyRollingStyle || estimation == BlueGreenRollingStyle { + if estimation == BlueGreenRollingStyle { return false } targetRef := rollout.Spec.WorkloadRef