mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 04:52:08 +00:00
Merge pull request #120075 from lowang-bh/enhancement
Call getPodRevision once
This commit is contained in:
commit
ccca58aa36
@ -337,10 +337,11 @@ func computeReplicaStatus(pods []*v1.Pod, minReadySeconds int32, currentRevision
|
|||||||
|
|
||||||
// count the number of current and update replicas
|
// count the number of current and update replicas
|
||||||
if isCreated(pod) && !isTerminating(pod) {
|
if isCreated(pod) && !isTerminating(pod) {
|
||||||
if getPodRevision(pod) == currentRevision.Name {
|
revision := getPodRevision(pod)
|
||||||
|
if revision == currentRevision.Name {
|
||||||
status.currentReplicas++
|
status.currentReplicas++
|
||||||
}
|
}
|
||||||
if getPodRevision(pod) == updateRevision.Name {
|
if revision == updateRevision.Name {
|
||||||
status.updatedReplicas++
|
status.updatedReplicas++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user