resourcequota

package
v1.1.0-alpha.0....-ad7ed67 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2016 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

resourcequota contains a controller that makes resource quota usage observations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterQuotaPods

func FilterQuotaPods(pods []api.Pod) []*api.Pod

FilterQuotaPods eliminates pods that no longer have a cost against the quota pods that have a restart policy of always are always returned pods that are in a failed state, but have a restart policy of on failure are always returned pods that are not in a success state or a failure state are included in quota

func PodHasRequests

func PodHasRequests(pod *api.Pod, resourceName api.ResourceName) bool

PodHasRequests verifies that each container in the pod has an explicit request that is non-zero for a named resource

func PodRequests

func PodRequests(pod *api.Pod, resourceName api.ResourceName) (*resource.Quantity, error)

PodRequests returns sum of each resource request across all containers in pod

func PodsRequests

func PodsRequests(pods []*api.Pod, resourceName api.ResourceName) *resource.Quantity

PodsRequests returns sum of each resource request for each pod in list If a given pod in the list does not have a request for the named resource, we log the error but still attempt to get the most representative count

Types

type ResourceQuotaController

type ResourceQuotaController struct {
	// contains filtered or unexported fields
}

ResourceQuotaController is responsible for tracking quota usage status in the system

func NewResourceQuotaController

func NewResourceQuotaController(kubeClient clientset.Interface, resyncPeriod controller.ResyncPeriodFunc) *ResourceQuotaController

NewResourceQuotaController creates a new ResourceQuotaController

func (*ResourceQuotaController) Run

func (rq *ResourceQuotaController) Run(workers int, stopCh <-chan struct{})

Run begins quota controller using the specified number of workers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL