func daemonSetPodCountByAddon()

in pkg/scheduler/metrics.go [162:172]


func daemonSetPodCountByAddon(l []*appsv1.DaemonSet) map[common.Addon]int {
	podCounts := map[common.Addon]int{}
	for _, d := range l {
		if d.Status.DesiredNumberScheduled != 0 {
			if a, ok := common.AddonFromDaemonSet(d); ok {
				podCounts[a] = podCounts[a] + 1
			}
		}
	}
	return podCounts
}