-
Notifications
You must be signed in to change notification settings - Fork 615
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
CONSOLE-922: Support AppliedClusterResourceQuota for normal users #10137
CONSOLE-922: Support AppliedClusterResourceQuota for normal users #10137
Conversation
717c9b3
to
3c3922a
Compare
740be0e
to
83e5c01
Compare
With suggested "always show ACRQ behavior": I addressed PR feedback where possible. @spadgett - I moved the ACRQ logic in the table row out into its own table row; let me know if you meant something else in your comment. Please also let me know if you have thoughts on the table component if you're against passing the namespace down. I also added a test for the ACRQ ResourceUsageRow. |
f59e722
to
3c471d2
Compare
We definitely don't want to pass An alternative that might be better is transitioning to the new table API: #8829 |
@rebeccaalpert We should update the project overview page as well to show cluster quotas. |
7ed3442
to
c2da38d
Compare
All set @spadgett. I added ACRQs to the project dashboard. |
@rebeccaalpert Sorry, I wasn't clear. I was thinking of the |
frontend/public/components/dashboard/project-dashboard/inventory-card.tsx
Outdated
Show resolved
Hide resolved
7aac202
to
46dcad2
Compare
This is all set @spadgett. I defined an ACRQ list page and added ACRQs to the ResourceQuotaCard: I updated the behavior for the ResourceQuotas list page. ClusterResourceQuotas are displayed on the ResourceQuotas list page if "all namespaces" is selected. Otherwise, ACRQs are shown. ACRQs now link to the relevant CRQ if users can list CRQs. |
...sole-shared/src/components/dashboard/resource-quota-card/AppliedClusterResourceQuotaItem.tsx
Show resolved
Hide resolved
...sole-shared/src/components/dashboard/resource-quota-card/AppliedClusterResourceQuotaItem.tsx
Outdated
Show resolved
Hide resolved
...sole-shared/src/components/dashboard/resource-quota-card/AppliedClusterResourceQuotaItem.tsx
Outdated
Show resolved
Hide resolved
frontend/public/components/dashboard/project-dashboard/resource-quota-card.tsx
Outdated
Show resolved
Hide resolved
@rebeccaalpert We should add some integration tests to cover this. It's an important function that we don't test manually often during development. |
46dcad2
to
2c07d76
Compare
Pushed changes from this morning; still needs integration tests. |
4d0dc2d
to
84ec99b
Compare
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.
/lgtm
/assign @opayne1 /assign @yapei /assign @RickJWagner |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
Putting on hold because the merge queue is blocked due to a test flake. This is ready for docs, product, and QE review though. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/label px-approved |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/label docs-approved |
/lgtm |
/label qe-approved |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rebeccaalpert, schituku, TheRealJon, zherman0 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
List Pages
I added logic so the resource link knows what the current namespace is. We need to pass the user's current namespace to the resource link if it's an ACRQ because the ACRQ itself doesn't supply namespace metadata.
Scoped namespace:
All namespaces:
Support for search page (links work):
Support for API explorer page (instances links work):
Details Page
New details page:
New total used field (total used is cluster scope and used is scoped to the current namespace):
We show ACRQs in the Resource Quota card in the project overview:
I'm basing the meat of the list page part of the PR on some work Sam did a few years ago: https://github.com/spadgett/console/commits/applied-cluster-quota.
Fixes https://issues.redhat.com/browse/CONSOLE-922.
How to test:
rebecca
here) and loginoc new-project ralpert-test
oc create role rqviewer --verb=get,list,watch --resource=resourcequota,appliedclusterresourcequota -n ralpert-test
oc adm policy add-role-to-user rqviewer rebecca --role-namespace=ralpert-test
rebecca
and runoc get appliedclusterresourcequota
. If you can see an ACRQ, you should see it in the UI list.