func deploymentPodCountByAddon()

in pkg/scheduler/metrics.go [174:184]


func deploymentPodCountByAddon(l []*appsv1.Deployment) map[common.Addon]int {
	podCounts := map[common.Addon]int{}
	for _, d := range l {
		if *d.Spec.Replicas > 0 {
			if a, ok := common.AddonFromDeployment(d); ok {
				podCounts[a] = podCounts[a] + int(*d.Spec.Replicas)
			}
		}
	}
	return podCounts
}