-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Feat/auto update quota #5538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/auto update quota #5538
Conversation
TestGru AssignmentSummary
Files
Tip You can |
TestGru AssignmentSummary
Files
Tip You can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces an auto-updating resource quota feature that adjusts namespace quotas dynamically.
- Added a conditional controller setup in main.go to enable auto resource quota updates.
- Updated RBAC rules in deploy.yaml to allow additional event operations.
- Created a new NamespaceQuotaReconciler controller in quota_controller.go that monitors namespace events and adjusts quotas accordingly.
Reviewed Changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| controllers/resources/main.go | Introduces conditional auto quota controller initialization |
| controllers/resources/deploy/manifests/deploy.yaml | Updates RBAC rules to include event creation and modification |
| controllers/resources/controllers/quota_controller.go | Implements the quota controller, including quota adjustment logic |
Files not reviewed (2)
- controllers/account/Makefile: Language not supported
- controllers/resources/Makefile: Language not supported
Comments suppressed due to low confidence (1)
controllers/resources/controllers/quota_controller.go:50
- The standard library's sync.Mutex does not support the TryLock() method. Consider using an alternative implementation (such as a channel-based lock or a third-party library that provides non-blocking locking) to achieve the desired behavior.
if r.namespaceLocks[evt.Namespace].TryLock() {
No description provided.