Back to godoc.org

Package resourcequota

v1.18.8
Latest Go to latest
Published: 1 day ago | License: Apache-2.0 | Module: k8s.io/kubernetes

Index

Package Files

Constants

const GroupName = "apiserver.config.k8s.io"

GroupName is the group name use in this package

const LegacyGroupName = "resourcequota.admission.k8s.io"

LegacyGroupName is the group name use in this package

Variables

var (
	// SchemeBuilder is a pointer used to call AddToScheme
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is used to register the types to API encoding/decoding machinery
	AddToScheme = SchemeBuilder.AddToScheme
)
var LegacySchemeGroupVersion = schema.GroupVersion{Group: LegacyGroupName, Version: runtime.APIVersionInternal}

LegacySchemeGroupVersion is group version used to register these objects

var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}

SchemeGroupVersion is group version used to register these objects

type Configuration

type Configuration struct {
	metav1.TypeMeta

	// LimitedResources whose consumption is limited by default.
	// +optional
	LimitedResources []LimitedResource
}

Configuration provides configuration for the ResourceQuota admission controller.

func (*Configuration) DeepCopy

func (in *Configuration) DeepCopy() *Configuration

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

func (*Configuration) DeepCopyInto

func (in *Configuration) DeepCopyInto(out *Configuration)

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

func (*Configuration) DeepCopyObject

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

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

type LimitedResource

type LimitedResource struct {

	// APIGroup is the name of the APIGroup that contains the limited resource.
	// +optional
	APIGroup string `json:"apiGroup,omitempty"`

	// Resource is the name of the resource this rule applies to.
	// For example, if the administrator wants to limit consumption
	// of a storage resource associated with persistent volume claims,
	// the value would be "persistentvolumeclaims".
	Resource string `json:"resource"`

	// For each intercepted request, the quota system will evaluate
	// its resource usage.  It will iterate through each resource consumed
	// and if the resource contains any substring in this listing, the
	// quota system will ensure that there is a covering quota.  In the
	// absence of a covering quota, the quota system will deny the request.
	// For example, if an administrator wants to globally enforce that
	// that a quota must exist to consume persistent volume claims associated
	// with any storage class, the list would include
	// ".storageclass.storage.k8s.io/requests.storage"
	MatchContains []string

	// For each intercepted request, the quota system will figure out if the input object
	// satisfies a scope which is present in this listing, then
	// quota system will ensure that there is a covering quota.  In the
	// absence of a covering quota, the quota system will deny the request.
	// For example, if an administrator wants to globally enforce that
	// a quota must exist to create a pod with "cluster-services" priorityclass
	// the list would include
	// "PriorityClassNameIn=cluster-services"
	// +optional
	//	MatchScopes []string `json:"matchScopes,omitempty"`
	MatchScopes []corev1.ScopedResourceSelectorRequirement `json:"matchScopes,omitempty"`
}

LimitedResource matches a resource whose consumption is limited by default. To consume the resource, there must exist an associated quota that limits its consumption.

func (*LimitedResource) DeepCopy

func (in *LimitedResource) DeepCopy() *LimitedResource

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

func (*LimitedResource) DeepCopyInto

func (in *LimitedResource) DeepCopyInto(out *LimitedResource)

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

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier