Documentation ¶
Overview ¶
Package core contains modules that interface with the core api group
Index ¶
- Variables
- func GetQuotaServiceType(service *corev1.Service) corev1.ServiceType
- func NewEvaluators(f quota.ListerForResourceFunc) []quota.Evaluator
- func NewPersistentVolumeClaimEvaluator(f quota.ListerForResourceFunc) quota.Evaluator
- func NewPodEvaluator(f quota.ListerForResourceFunc, clock clock.Clock) quota.Evaluator
- func NewResourceClaimEvaluator(f quota.ListerForResourceFunc) quota.Evaluator
- func NewServiceEvaluator(f quota.ListerForResourceFunc) quota.Evaluator
- func PodUsageFunc(obj runtime.Object, clock clock.Clock) (corev1.ResourceList, error)
- func QuotaV1Pod(pod *corev1.Pod, clock clock.Clock) bool
- func RequiresQuotaReplenish(pvc, oldPVC *corev1.PersistentVolumeClaim) bool
- func V1ResourceByDeviceClass(className string) corev1.ResourceName
- func V1ResourceByStorageClass(storageClass string, resourceName corev1.ResourceName) corev1.ResourceName
Constants ¶
This section is empty.
Variables ¶
var ClaimObjectCountName = generic.ObjectCountQuotaResourceNameFor(resourceapi.SchemeGroupVersion.WithResource("resourceclaims").GroupResource())
The name used for object count quota. This evaluator takes over counting those because of it's GroupResource, so it has to implement this count.
Functions ¶
func GetQuotaServiceType ¶
func GetQuotaServiceType(service *corev1.Service) corev1.ServiceType
GetQuotaServiceType returns ServiceType if the service type is eligible to track against a quota, nor return ""
func NewEvaluators ¶
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 ¶
NewPodEvaluator returns an evaluator that can evaluate pods
func NewResourceClaimEvaluator ¶ added in v1.31.0
func NewResourceClaimEvaluator(f quota.ListerForResourceFunc) quota.Evaluator
NewResourceClaimEvaluator returns an evaluator that can evaluate resource claims
func NewServiceEvaluator ¶
func NewServiceEvaluator(f quota.ListerForResourceFunc) quota.Evaluator
NewServiceEvaluator returns an evaluator that can evaluate services.
func PodUsageFunc ¶
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 QuotaV1Pod ¶
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 RequiresQuotaReplenish ¶ added in v1.23.0
func RequiresQuotaReplenish(pvc, oldPVC *corev1.PersistentVolumeClaim) bool
RequiresQuotaReplenish enables quota monitoring for PVCs.
func V1ResourceByDeviceClass ¶ added in v1.31.0
func V1ResourceByDeviceClass(className string) corev1.ResourceName
V1ResourceByDeviceClass returns a quota resource name by device class.
func V1ResourceByStorageClass ¶
func V1ResourceByStorageClass(storageClass string, resourceName corev1.ResourceName) corev1.ResourceName
V1ResourceByStorageClass returns a quota resource name by storage class.
Types ¶
This section is empty.