mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 11:18:16 +00:00
reducae function calling to once
Signed-off-by: lowang-bh <lhui_wang@163.com>
This commit is contained in:
@@ -337,10 +337,11 @@ func computeReplicaStatus(pods []*v1.Pod, minReadySeconds int32, currentRevision
|
||||
|
||||
// count the number of current and update replicas
|
||||
if isCreated(pod) && !isTerminating(pod) {
|
||||
if getPodRevision(pod) == currentRevision.Name {
|
||||
revision := getPodRevision(pod)
|
||||
if revision == currentRevision.Name {
|
||||
status.currentReplicas++
|
||||
}
|
||||
if getPodRevision(pod) == updateRevision.Name {
|
||||
if revision == updateRevision.Name {
|
||||
status.updatedReplicas++
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user