core

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2018 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

core contains modules that interface with the core api group

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetQuotaServiceType added in v1.4.0

func GetQuotaServiceType(service *v1.Service) v1.ServiceType

GetQuotaServiceType returns ServiceType if the service type is eligible to track against a quota, nor return ""

func NewEvaluators added in v1.9.1

func NewEvaluators(f quota.ListerForResourceFunc) []quota.Evaluator

NewEvaluators returns the list of static evaluators that manage more than counts

func NewPersistentVolumeClaimEvaluator

func NewPersistentVolumeClaimEvaluator(f quota.ListerForResourceFunc) quota.Evaluator

NewPersistentVolumeClaimEvaluator returns an evaluator that can evaluate persistent volume claims

func NewPodEvaluator

func NewPodEvaluator(f quota.ListerForResourceFunc, clock clock.Clock) quota.Evaluator

NewPodEvaluator returns an evaluator that can evaluate pods

func NewServiceEvaluator

func NewServiceEvaluator(f quota.ListerForResourceFunc) quota.Evaluator

NewServiceEvaluator returns an evaluator that can evaluate services.

func PodUsageFunc

func PodUsageFunc(obj runtime.Object, clock clock.Clock) (api.ResourceList, error)

PodUsageFunc returns the quota usage for a pod. A pod is charged for quota if the following are not true.

  • pod has a terminal phase (failed or succeeded)
  • pod has been marked for deletion and grace period has expired

func QuotaPod

func QuotaPod(pod *api.Pod, clock clock.Clock) bool

QuotaPod returns true if the pod is eligible to track against a quota A pod is eligible for quota, unless any of the following are true:

  • pod has a terminal phase (failed or succeeded)
  • pod has been marked for deletion and grace period has expired.

func QuotaV1Pod added in v1.6.1

func QuotaV1Pod(pod *v1.Pod, clock clock.Clock) bool

QuotaV1Pod returns true if the pod is eligible to track against a quota if it's not in a terminal state according to its phase.

func ResourceByStorageClass added in v1.6.1

func ResourceByStorageClass(storageClass string, resourceName api.ResourceName) api.ResourceName

ResourceByStorageClass returns a quota resource name by storage class.

func V1ResourceByStorageClass added in v1.6.1

func V1ResourceByStorageClass(storageClass string, resourceName v1.ResourceName) v1.ResourceName

V1ResourceByStorageClass returns a quota resource name by storage class.

Types

This section is empty.

Jump to

Keyboard shortcuts

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