Report actual replicas in deployment status

This commit is contained in:
Janet Kuo
2016-02-22 14:28:28 -08:00
parent fb2a209ed7
commit 3901423272
2 changed files with 11 additions and 2 deletions

View File

@@ -1042,8 +1042,8 @@ func (dc *DeploymentController) updateDeploymentStatus(allRSs []*extensions.Repl
}
func (dc *DeploymentController) calculateStatus(allRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaSet, deployment extensions.Deployment) (totalReplicas, updatedReplicas, availableReplicas, unavailableReplicas int, err error) {
totalReplicas = deploymentutil.GetReplicaCountForReplicaSets(allRSs)
updatedReplicas = deploymentutil.GetReplicaCountForReplicaSets([]*extensions.ReplicaSet{newRS})
totalReplicas = deploymentutil.GetActualReplicaCountForReplicaSets(allRSs)
updatedReplicas = deploymentutil.GetActualReplicaCountForReplicaSets([]*extensions.ReplicaSet{newRS})
minReadySeconds := deployment.Spec.MinReadySeconds
availableReplicas, err = deploymentutil.GetAvailablePodsForReplicaSets(dc.client, allRSs, minReadySeconds)
if err != nil {