Documentation ¶
Index ¶
- func Add(a v1.ResourceList, b v1.ResourceList) v1.ResourceList
- func ContainsPrefix(prefixSet []string, item v1.ResourceName) bool
- func IsExtendedResourceName(name v1.ResourceName) bool
- func IsNativeResource(name v1.ResourceName) bool
- func IsPrefixedNativeResource(name v1.ResourceName) bool
- func Max(a v1.ResourceList, b v1.ResourceList) v1.ResourceList
- func ObjectCountQuotaResourceNameFor(groupResource schema.GroupResource) v1.ResourceName
- func PodUsageFunc(obj runtime.Object, clock clock.Clock) (v1.ResourceList, error)
- func QuotaV1Pod(pod *v1.Pod, clock clock.Clock) bool
- func ServiceUsage(item runtime.Object) (v1.ResourceList, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add(a v1.ResourceList, b v1.ResourceList) v1.ResourceList
func ContainsPrefix ¶
func ContainsPrefix(prefixSet []string, item v1.ResourceName) bool
ContainsPrefix returns true if the specified item has a prefix that contained in given prefix Set
func IsExtendedResourceName ¶
func IsExtendedResourceName(name v1.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 v1.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 v1.ResourceName) bool
IsPrefixedNativeResource returns true if the resource name is in the *kubernetes.io/ namespace.
func Max ¶
func Max(a v1.ResourceList, b v1.ResourceList) v1.ResourceList
Max returns the result of Max(a, b) for each named resource
func ObjectCountQuotaResourceNameFor ¶
func ObjectCountQuotaResourceNameFor(groupResource schema.GroupResource) v1.ResourceName
ObjectCountQuotaResourceNameFor returns the object count quota name for specified groupResource
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 ServiceUsage ¶
func ServiceUsage(item runtime.Object) (v1.ResourceList, error)
Types ¶
This section is empty.