diff --git a/pkg/util/controller_finder.go b/pkg/util/controller_finder.go index fb82db2..35a64c6 100644 --- a/pkg/util/controller_finder.go +++ b/pkg/util/controller_finder.go @@ -144,6 +144,12 @@ func (r *ControllerFinder) getKruiseCloneSet(namespace string, ref *rolloutv1alp if _, ok = workload.Annotations[InRolloutProgressingAnnotation]; !ok { return workload, nil } + + // no need to progress + if cloneSet.Status.Replicas == cloneSet.Status.UpdatedReplicas && cloneSet.Status.CurrentRevision == cloneSet.Status.UpdateRevision { + return workload, nil + } + // in rollout progressing workload.InRolloutProgressing = true // Is it in rollback phase @@ -191,6 +197,11 @@ func (r *ControllerFinder) getDeployment(namespace string, ref *rolloutv1alpha1. return workload, nil } + // no need to progress + if stable.Status.Replicas == stable.Status.UpdatedReplicas { + return workload, nil + } + // in rollout progressing workload.InRolloutProgressing = true // workload is continuous release, indicates rollback(v1 -> v2 -> v1) @@ -252,6 +263,12 @@ func (r *ControllerFinder) getStatefulSetLikeWorkload(namespace string, ref *rol if _, ok := workload.Annotations[InRolloutProgressingAnnotation]; !ok { return workload, nil } + + // no need to progress + if workloadInfo.Status.Replicas == workloadInfo.Status.UpdatedReplicas && workloadInfo.Status.StableRevision == workloadInfo.Status.UpdateRevision { + return workload, nil + } + // in rollout progressing workload.InRolloutProgressing = true