Documentation ¶
Index ¶
- Constants
- func GetPersistentVolumeClaimClass(claim *corev1.PersistentVolumeClaim) string
- func GetPodQOS(pod *corev1.Pod) corev1.PodQOSClass
- func GetQuotaServiceType(service *corev1.Service) corev1.ServiceType
- func IsExtendedResourceName(name corev1.ResourceName) bool
- func IsNativeResource(name corev1.ResourceName) bool
- func IsPrefixedNativeResource(name corev1.ResourceName) bool
- 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 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 ScopedResourceSelectorRequirementsAsSelector(ssr corev1.ScopedResourceSelectorRequirement) (labels.Selector, error)
- func V1ResourceByStorageClass(storageClass string, resourceName corev1.ResourceName) corev1.ResourceName
- type QOSList
Constants ¶
const ExpandPersistentVolumes featuregate.Feature = "ExpandPersistentVolumes"
owner: @gnufied beta: v1.11 Ability to Expand persistent volumes
Variables ¶
This section is empty.
Functions ¶
func GetPersistentVolumeClaimClass ¶
func GetPersistentVolumeClaimClass(claim *corev1.PersistentVolumeClaim) string
GetPersistentVolumeClaimClass returns StorageClassName. If no storage class was requested, it returns "".
func GetPodQOS ¶
func GetPodQOS(pod *corev1.Pod) corev1.PodQOSClass
GetPodQOS returns the QoS class of a pod. A pod is besteffort if none of its containers have specified any requests or limits. A pod is guaranteed only when requests and limits are specified for all the containers and they are equal. A pod is burstable if limits and requests do not match across all containers.
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 IsExtendedResourceName ¶
func IsExtendedResourceName(name corev1.ResourceName) bool
IsExtendedResourceName returns true if: 1. the resource name is not in the default namespace; 2. resource name does not have "requests." prefix, to avoid confusion with the convention in quota 3. it satisfies the rules in IsQualifiedName() after converted into quota resource name
func IsNativeResource ¶
func IsNativeResource(name corev1.ResourceName) bool
IsNativeResource returns true if the resource name is in the *kubernetes.io/ namespace. Partially-qualified (unprefixed) names are implicitly in the kubernetes.io/ namespace.
func IsPrefixedNativeResource ¶
func IsPrefixedNativeResource(name corev1.ResourceName) bool
IsPrefixedNativeResource returns true if the resource name is in the *kubernetes.io/ namespace.
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 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 ScopedResourceSelectorRequirementsAsSelector ¶
func ScopedResourceSelectorRequirementsAsSelector(ssr corev1.ScopedResourceSelectorRequirement) (labels.Selector, error)
ScopedResourceSelectorRequirementsAsSelector converts the ScopedResourceSelectorRequirement api type into a struct that implements labels.Selector.
func V1ResourceByStorageClass ¶
func V1ResourceByStorageClass(storageClass string, resourceName corev1.ResourceName) corev1.ResourceName
V1ResourceByStorageClass returns a quota resource name by storage class.
Types ¶
type QOSList ¶
type QOSList map[corev1.ResourceName]corev1.PodQOSClass
QOSList is a set of (resource name, QoS class) pairs.