diff --git a/pkg/controllers/metrics/pod/controller.go b/pkg/controllers/metrics/pod/controller.go index 9e01b1ab1f..8b14ef067c 100644 --- a/pkg/controllers/metrics/pod/controller.go +++ b/pkg/controllers/metrics/pod/controller.go @@ -52,6 +52,7 @@ const ( podHostCapacityType = "capacity_type" podHostInstanceType = "instance_type" podPhase = "phase" + podScheduled = "scheduled" ) var ( @@ -182,6 +183,7 @@ func labelNames() []string { podNamespace, ownerSelfLink, podHostName, + podScheduled, podNodePool, podHostZone, podHostArchitecture, @@ -383,6 +385,7 @@ func (c *Controller) makeLabels(ctx context.Context, pod *corev1.Pod) (prometheu } metricLabels[ownerSelfLink] = selflink metricLabels[podHostName] = pod.Spec.NodeName + metricLabels[podScheduled] = lo.Ternary(pod.Spec.NodeName != "", "true", "false") metricLabels[podPhase] = string(pod.Status.Phase) node := &corev1.Node{}