quota

package
v3.8.0+incompatible Latest Latest
Warning

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

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

Documentation

Overview

+groupName=quota.openshift.io Package api is the internal version of the API.

Index

Constants

View Source
const (
	GroupName       = "quota.openshift.io"
	LegacyGroupName = ""
)

Variables

View Source
var (
	SchemeGroupVersion       = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
	LegacySchemeGroupVersion = schema.GroupVersion{Group: LegacyGroupName, Version: runtime.APIVersionInternal}

	LegacySchemeBuilder    = runtime.NewSchemeBuilder(addLegacyKnownTypes, RegisterDeepCopies)
	AddToSchemeInCoreGroup = LegacySchemeBuilder.AddToScheme

	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)

SchemeGroupVersion is group version used to register these objects

Functions

func GetMatcher

func GetMatcher(selector ClusterResourceQuotaSelector) (func(obj runtime.Object) (bool, error), error)

func GetObjectMatcher

func GetObjectMatcher(selector ClusterResourceQuotaSelector) (func(obj metav1.Object) (bool, error), error)

func IsKindOrLegacy

func IsKindOrLegacy(kind string, gk schema.GroupKind) bool

IsKindOrLegacy checks if the provided GroupKind matches with the given kind by looking up the API group and also the legacy API.

func IsResourceOrLegacy

func IsResourceOrLegacy(resource string, gr schema.GroupResource) bool

IsResourceOrLegacy checks if the provided GroupResources matches with the given resource by looking up the API group and also the legacy API.

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func LegacyKind

func LegacyKind(kind string) schema.GroupKind

LegacyKind takes an unqualified kind and returns back a Group qualified GroupKind

func LegacyResource

func LegacyResource(resource string) schema.GroupResource

LegacyResource takes an unqualified resource and returns back a Group qualified GroupResource

func RegisterDeepCopies deprecated

func RegisterDeepCopies(scheme *runtime.Scheme) error

RegisterDeepCopies adds deep-copy functions to the given scheme. Public to allow building arbitrary schemes.

Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns back a Group qualified GroupResource

Types

type AppliedClusterResourceQuota

type AppliedClusterResourceQuota struct {
	metav1.TypeMeta
	// Standard object's metadata.
	metav1.ObjectMeta

	// Spec defines the desired quota
	Spec ClusterResourceQuotaSpec

	// Status defines the actual enforced quota and its current usage
	Status ClusterResourceQuotaStatus
}

AppliedClusterResourceQuota mirrors ClusterResourceQuota at a project scope, for projection into a project. It allows a project-admin to know which ClusterResourceQuotas are applied to his project and their associated usage.

func ConvertClusterResourceQuotaToAppliedClusterResourceQuota

func ConvertClusterResourceQuotaToAppliedClusterResourceQuota(in *ClusterResourceQuota) *AppliedClusterResourceQuota

ConvertClusterResourceQuotaToAppliedClusterQuota returns back a converted AppliedClusterResourceQuota which is NOT a deep copy.

func (*AppliedClusterResourceQuota) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppliedClusterResourceQuota.

func (*AppliedClusterResourceQuota) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AppliedClusterResourceQuota) DeepCopyObject

func (in *AppliedClusterResourceQuota) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AppliedClusterResourceQuotaList

type AppliedClusterResourceQuotaList struct {
	metav1.TypeMeta
	// Standard object's metadata.
	metav1.ListMeta

	// Items is a list of AppliedClusterResourceQuota
	Items []AppliedClusterResourceQuota
}

AppliedClusterResourceQuotaList is a collection of AppliedClusterResourceQuotas

func (*AppliedClusterResourceQuotaList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppliedClusterResourceQuotaList.

func (*AppliedClusterResourceQuotaList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AppliedClusterResourceQuotaList) DeepCopyObject

func (in *AppliedClusterResourceQuotaList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterResourceQuota

type ClusterResourceQuota struct {
	metav1.TypeMeta
	// Standard object's metadata.
	metav1.ObjectMeta

	// Spec defines the desired quota
	Spec ClusterResourceQuotaSpec

	// Status defines the actual enforced quota and its current usage
	Status ClusterResourceQuotaStatus
}

ClusterResourceQuota mirrors ResourceQuota at a cluster scope. This object is easily convertible to synthetic ResourceQuota object to allow quota evaluation re-use.

func ConvertAppliedClusterResourceQuotaToClusterResourceQuota

func ConvertAppliedClusterResourceQuotaToClusterResourceQuota(in *AppliedClusterResourceQuota) *ClusterResourceQuota

ConvertClusterResourceQuotaToAppliedClusterQuota returns back a converted AppliedClusterResourceQuota which is NOT a deep copy.

func (*ClusterResourceQuota) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceQuota.

func (*ClusterResourceQuota) DeepCopyInto

func (in *ClusterResourceQuota) DeepCopyInto(out *ClusterResourceQuota)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterResourceQuota) DeepCopyObject

func (in *ClusterResourceQuota) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterResourceQuotaList

type ClusterResourceQuotaList struct {
	metav1.TypeMeta
	// Standard object's metadata.
	metav1.ListMeta

	// Items is a list of ClusterResourceQuotas
	Items []ClusterResourceQuota
}

ClusterResourceQuotaList is a collection of ClusterResourceQuotas

func (*ClusterResourceQuotaList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceQuotaList.

func (*ClusterResourceQuotaList) DeepCopyInto

func (in *ClusterResourceQuotaList) DeepCopyInto(out *ClusterResourceQuotaList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterResourceQuotaList) DeepCopyObject

func (in *ClusterResourceQuotaList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterResourceQuotaSelector

type ClusterResourceQuotaSelector struct {
	// LabelSelector is used to select projects by label.
	LabelSelector *metav1.LabelSelector

	// AnnotationSelector is used to select projects by annotation.
	AnnotationSelector map[string]string
}

ClusterResourceQuotaSelector is used to select projects. At least one of LabelSelector or AnnotationSelector must present. If only one is present, it is the only selection criteria. If both are specified, the project must match both restrictions.

func (*ClusterResourceQuotaSelector) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceQuotaSelector.

func (*ClusterResourceQuotaSelector) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterResourceQuotaSpec

type ClusterResourceQuotaSpec struct {
	// Selector is the selector used to match projects.
	// It should only select active projects on the scale of dozens (though it can select
	// many more less active projects).  These projects will contend on object creation through
	// this resource.
	Selector ClusterResourceQuotaSelector

	// Quota defines the desired quota
	Quota kapi.ResourceQuotaSpec
}

ClusterResourceQuotaSpec defines the desired quota restrictions

func (*ClusterResourceQuotaSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceQuotaSpec.

func (*ClusterResourceQuotaSpec) DeepCopyInto

func (in *ClusterResourceQuotaSpec) DeepCopyInto(out *ClusterResourceQuotaSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterResourceQuotaStatus

type ClusterResourceQuotaStatus struct {
	// Total defines the actual enforced quota and its current usage across all projects
	Total kapi.ResourceQuotaStatus

	// Namespaces slices the usage by project.  This division allows for quick resolution of
	// deletion reconciliation inside of a single project without requiring a recalculation
	// across all projects.  This map can be used to pull the deltas for a given project.
	Namespaces ResourceQuotasStatusByNamespace
}

ClusterResourceQuotaStatus defines the actual enforced quota and its current usage

func (*ClusterResourceQuotaStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceQuotaStatus.

func (*ClusterResourceQuotaStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceQuotasStatusByNamespace

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

ResourceQuotasStatusByNamespace provides type correct methods

func (ResourceQuotasStatusByNamespace) DeepCopy

DeepCopy implements a custom copy to correctly handle unexported fields Must match "func (t T) DeepCopy() T" for the deep copy generator to use it

func (*ResourceQuotasStatusByNamespace) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourceQuotasStatusByNamespace) Get

func (*ResourceQuotasStatusByNamespace) Insert

func (*ResourceQuotasStatusByNamespace) OrderedKeys

func (o *ResourceQuotasStatusByNamespace) OrderedKeys() *list.List

func (*ResourceQuotasStatusByNamespace) Remove

func (o *ResourceQuotasStatusByNamespace) Remove(key string)

Directories

Path Synopsis
+groupName=quota.openshift.io Package v1 is the v1 version of the API.
+groupName=quota.openshift.io Package v1 is the v1 version of the API.

Jump to

Keyboard shortcuts

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