Max Allowed Submitted Quota (v1alpha2)¶
The MaxAllowedSubmittedQuota feature allows administrators to define a global "ceiling" for quotas requested by users in a Paas resource.
While PaasConfig.spec.capabilities defines default and per-capability quotas, MaxAllowedSubmittedQuota acts as a final validation guardrail at the Paas level.
Configuration¶
This is configured in the PaasConfig (v1alpha2) under .spec.maxAllowedSubmittedQuota.maxQuota.
PaasConfig Snippet
How it works¶
- Admission Control: When a user creates or updates a
Paasresource, the validating webhook compares the values inPaas.spec.quotaagainst the values defined inPaasConfig.spec.maxAllowedSubmittedQuota.maxQuota. - Quantity Comparison: Comparison is performed using Kubernetes
resource.Quantitylogic (e.g.,1000mis equal to1). - Denial: If any requested resource exceeds the maximum allowed value, the request is rejected with an error message indicating which resource violated the policy.
Example Denial
If the max allowed limits.cpu is 8 and a user submits a Paas with limits.cpu: "10", the webhook returns:
quota (limits.cpu) cannot be larger than MaxAllowedSubmittedQuota (8)
Key Validations¶
The keys used in maxQuota (e.g., limits.cpu) are subject to the same regex validation as other quota fields in the operator.
If you have configured PaasConfig.spec.validations.paas.allowedQuotas, any key added to MaxAllowedSubmittedQuota must match that regular expression. If it does not, the PaasConfig itself will be rejected during creation or update.
For more details on regex validation, see the Validations guide.
Important Notes¶
- Empty Quotas: If a
Paasdoes not define any quotas in.spec.quota, this validation is skipped. - Guardrail Only: This feature is a validation guardrail for the
Paascustom resource. It does not replace or modify standard KubernetesResourceQuotaorLimitRangeobjects in the underlying namespaces.