Revert "kubectl: respect deployment strategy parameters for rollout status"
This reverts commit d20ac8766e
.
This commit is contained in:
@@ -78,9 +78,8 @@ func (s *DeploymentStatusViewer) Status(namespace, name string, revision int64)
|
||||
if deployment.Status.Replicas > deployment.Status.UpdatedReplicas {
|
||||
return fmt.Sprintf("Waiting for rollout to finish: %d old replicas are pending termination...\n", deployment.Status.Replicas-deployment.Status.UpdatedReplicas), false, nil
|
||||
}
|
||||
minRequired := deployment.Spec.Replicas - util.MaxUnavailableInternal(*deployment)
|
||||
if deployment.Status.AvailableReplicas < minRequired {
|
||||
return fmt.Sprintf("Waiting for rollout to finish: %d of %d updated replicas are available (minimum required: %d)...\n", deployment.Status.AvailableReplicas, deployment.Status.UpdatedReplicas, minRequired), false, nil
|
||||
if deployment.Status.AvailableReplicas < deployment.Status.UpdatedReplicas {
|
||||
return fmt.Sprintf("Waiting for rollout to finish: %d of %d updated replicas are available...\n", deployment.Status.AvailableReplicas, deployment.Status.UpdatedReplicas), false, nil
|
||||
}
|
||||
return fmt.Sprintf("deployment %q successfully rolled out\n", name), true, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user