quota

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetResourceQuotasStatusByNamespace

func GetResourceQuotasStatusByNamespace(namespaceStatuses configv1alpha1.AccountQuotasStatusByNamespace, namespace string) (corev1.ResourceQuotaStatus, bool)

func NewAccountResourceQuota

func NewAccountResourceQuota(ctrlCtx *controllers.Context) admission.ValidationInterface

NewAccountResourceQuota configures an admission controller that can enforce accountQuota constraints using the provided registry. The registry must have the capability to handle group/kinds that are persisted by the server this admission controller is intercepting

func NewQuotaConfiguration

func NewQuotaConfiguration(f quota.ListerForResourceFunc) quota.Configuration

NewQuotaConfiguration creates a new quota configuration that can be used to create quota registry

func RecommendedDefaultResourceQuotaControllerConfiguration

func RecommendedDefaultResourceQuotaControllerConfiguration(obj *kubectrlmgrconfigv1alpha1.ResourceQuotaControllerConfiguration)

RecommendedDefaultResourceQuotaControllerConfiguration defaults a pointer to a ResourceQuotaControllerConfiguration struct. This will set the recommended default values, but they may be subject to change between API versions. This function is intentionally not registered in the scheme as a "normal" `SetDefaults_Foo` function to allow consumers of this type to set whatever defaults for their embedded configs. Forcing consumers to use these defaults would be problematic as defaulting in the scheme is done as part of the conversion, and there would be no easy way to opt-out. Instead, if you want to use this defaulting method run it in your wrapper struct of this type in its `SetDefaults_` method.

func Register

func Register(ctrlCtx *controllers.Context) error

Register registers the quota controller

func RemoveResourceQuotasStatusByNamespace

func RemoveResourceQuotasStatusByNamespace(namespaceStatuses *configv1alpha1.AccountQuotasStatusByNamespace, namespace string)

Types

type ByName

type ByName []corev1.ResourceQuota

func (ByName) Len

func (v ByName) Len() int

func (ByName) Less

func (v ByName) Less(i, j int) bool

func (ByName) Swap

func (v ByName) Swap(i, j int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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