Continue label is no more needed for countHealthyPods()

This commit is contained in:
drfish 2020-03-28 09:57:25 +08:00
parent 119660098b
commit 251706ceb4

View File

@ -689,7 +689,6 @@ func (dc *DisruptionController) getExpectedScale(pdb *policy.PodDisruptionBudget
} }
func countHealthyPods(pods []*v1.Pod, disruptedPods map[string]metav1.Time, currentTime time.Time) (currentHealthy int32) { func countHealthyPods(pods []*v1.Pod, disruptedPods map[string]metav1.Time, currentTime time.Time) (currentHealthy int32) {
Pod:
for _, pod := range pods { for _, pod := range pods {
// Pod is being deleted. // Pod is being deleted.
if pod.DeletionTimestamp != nil { if pod.DeletionTimestamp != nil {
@ -701,7 +700,6 @@ Pod:
} }
if podutil.IsPodReady(pod) { if podutil.IsPodReady(pod) {
currentHealthy++ currentHealthy++
continue Pod
} }
} }