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.



    This section is empty.


    This section is empty.


    func Handler

    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

      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.


        This section is empty.

        Source Files