quota

package
v0.0.0-...-e779149 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ControllerName                 = "resourcequota-controller"
	DefaultResyncPeriod            = 5 * time.Minute
	DefaultMaxConcurrentReconciles = 8
)

Variables

This section is empty.

Functions

func NewResourceQuotaAdmission

func NewResourceQuotaAdmission(client client.Client, scheme *runtime.Scheme) (webhook.AdmissionHandler, error)

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)

type DefaultLockFactory

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

func NewDefaultLockFactory

func NewDefaultLockFactory() *DefaultLockFactory

func (*DefaultLockFactory) GetLock

func (f *DefaultLockFactory) GetLock(key string) sync.Locker

type LockFactory

type LockFactory interface {
	GetLock(string) sync.Locker
}

Following code copied from github.com/openshift/apiserver-library-go/pkg/admission/quota/clusterresourcequota

type Reconciler

type Reconciler struct {
	client.Client

	MaxConcurrentReconciles int
	// Controls full recalculation of quota usage
	ResyncPeriod    time.Duration
	InformerFactory k8sinformers.SharedInformerFactory
	// contains filtered or unexported fields
}

Reconciler reconciles a Workspace object

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error

type ResourceQuotaAdmission

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

func (*ResourceQuotaAdmission) Handle

Jump to

Keyboard shortcuts

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