fix: skip quota enforcement for resources outside project context#531
Open
zachsmith1 wants to merge 1 commit intomainfrom
Open
fix: skip quota enforcement for resources outside project context#531zachsmith1 wants to merge 1 commit intomainfrom
zachsmith1 wants to merge 1 commit intomainfrom
Conversation
Contributor
…ontrol planes Add ResourceGrant setup steps to note-multicluster-subject and clusternote-multicluster-subject e2e tests so their projects have quota allocated for notes, configmaps, and secrets. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0999434 to
e2185af
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two fixes for quota enforcement breaking existing e2e tests after ClaimCreationPolicies were deployed in PR #528:
1. Skip quota in root control plane
The admission plugin now skips ResourceClaim creation when no consumer (project) context can be determined. Resources created in the root control plane (e.g. CRM notes test) are not subject to per-project quota.
Previously, creating Notes, ConfigMaps, or Secrets outside a project control plane failed with "Insufficient quota" because the claim had no consumerRef and couldn't match any AllowanceBucket.
2. Add test-specific grants for project-scoped tests
Add ResourceGrant setup steps to
note-multicluster-subjectandclusternote-multicluster-subjecte2e tests so their projects have quota allocated. These tests create resources in project control planes which now require quota grants.Test plan
crm-note-contact-lifecyclepasses (root-scoped Notes skip quota)note-multicluster-subjectpasses (project-scoped with test grant)clusternote-multicluster-subjectpasses (project-scoped with test grant)🤖 Generated with Claude Code