traffic: nextStep Index default value from 0 to -1

Signed-off-by: yunbo <yunbo10124scut@gmail.com>
This commit is contained in:
yunbo 2024-06-07 17:44:02 +08:00
parent d32837e104
commit d0210313fc
1 changed files with 4 additions and 1 deletions

View File

@ -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