kubernetes: k8s.io/kubernetes/pkg/scheduler/metrics/resources Index | Files

package resources

import "k8s.io/kubernetes/pkg/scheduler/metrics/resources"

Package resources provides a metrics collector that reports the resource consumption (requests and limits) of the pods in the cluster as the scheduler and kubelet would interpret it.

Index

Package Files

resources.go

func Handler Uses

func Handler(podLister corelisters.PodLister) http.Handler

Handler creates a collector from the provided podLister and returns an http.Handler that will report the requested metrics in the prometheus format. It does not include any other metrics.

func NewPodResourcesMetricsCollector Uses

func NewPodResourcesMetricsCollector(podLister corelisters.PodLister) metrics.StableCollector

NewPodResourcesMetricsCollector registers a O(pods) cardinality metric that reports the current resources requested by all pods on the cluster within the Kubernetes resource model. Metrics are broken down by pod, node, resource, and phase of lifecycle. Each pod returns two series per resource - one for their aggregate usage (required to schedule) and one for their phase specific usage. This allows admins to assess the cost per resource at different phases of startup and compare to actual resource usage.

Package resources imports 9 packages (graph) and is imported by 3 packages. Updated 2020-11-17. Refresh now. Tools for package owners.