Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddInitalNamespaceQuotas ¶
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) 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.
Click to show internal directories.
Click to hide internal directories.