func nodeConditions()

in pkg/scheduler/metrics.go [67:83]


func nodeConditions(l []*v1.Node) *mapCounter {
	mc := newMapCounter()
	for _, node := range l {
		nodepool := getLabel(node.Labels, "cloud.google.com/gke-nodepool")
		zone := getLabel(node.Labels, "topology.kubernetes.io/zone")
		for t, s := range conditionStatuses(node.Status.Conditions) {
			labels := map[string]string{
				"nodepool": nodepool,
				"zone":     zone,
				"type":     t,
				"status":   s,
			}
			mc.Increment(labels, 1)
		}
	}
	return mc
}