quotas

package
v4.60.4 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddInitalNamespaceQuotas

func AddInitalNamespaceQuotas(ctx context.Context, ns *corev1.Namespace, s *utils.Sidecars, kind string) bool

AddInitalNamespaceQuotas will add the default quotas to the namespace annotations. It will only add them, if there are currently no such annotations in place.

Types

type QuotaChecker

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

QuotaChecker can check the given resources against the quotas set on an intance namespace

func NewQuotaChecker

func NewQuotaChecker(c client.Client, claimName, claimNamespace, instanceNamespace string, r utils.Resources, gr schema.GroupResource, gk schema.GroupKind, checkNamespaceQuota bool, instances int64) QuotaChecker

NewQuotaChecker creates a new quota checker. checkNamespaceQuota specifies whether or not the checker should also take the amount of existing namespaces into account, or not.

func (*QuotaChecker) CheckQuotas

func (q *QuotaChecker) CheckQuotas(ctx context.Context) *apierrors.StatusError

CheckQuotas runs the given quotas against a namespace. It also checks if the amount of namepsaces is within the quota as well.

Jump to

Keyboard shortcuts

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