Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Show HierarchicalResourceQuota status by kubectl get #295

Conversation

mochizuki875
Copy link
Contributor

@mochizuki875 mochizuki875 commented Jun 7, 2023

What type of PR is this?:

/kind feature

What this PR does / why we need it:

We have added kubectl-hns hrq sub-command to show HierarchicalResourceQuota status in easy way.(#283)
However, it's not yet possible to achive that using the Kubernetes standard way kubectl get hrq.

$ kubectl get hrq -n test
NAME       AGE
test-hrq   80s

So in this PR, I made it possible to show HierarchicalResourceQuota status by using kubectl get hrq.

$ kubectl get hrq -n test
NAME         REQUEST                                              LIMIT
test-hrq     requests.cpu: 500m/1, requests.memory: 100Mi/200Mi   limits.cpu: 500m/2, limits.memory: 100Mi/500Mi
test-hrq-2   requests.memory: 100Mi/300Mi                         limits.cpu: 500m/1

$ kubectl get hrq --all-namespaces
NAMESPACE   NAME         REQUEST                                              LIMIT
test-2      test-hrq-3   requests.cpu: 0/4, requests.memory: 0/500Mi          limits.cpu: 0/8, limits.memory: 0/750Mi
test        test-hrq     requests.cpu: 500m/1, requests.memory: 100Mi/200Mi   limits.cpu: 500m/2, limits.memory: 100Mi/500Mi
test        test-hrq-2   requests.memory: 100Mi/300Mi                         limits.cpu: 500m/1

Tested:

Unit and E2E tests has passed.
I also added test case to HRQ E2E test which is now Pending.

Related:

#274
#283
#289

Special notes for your reviewer:

HierarchicalResourceQuota documentation is proceeding by @zfrhv and @adrianludwin.(#289)
If this PR will be merged to v1.1, we should add this feature to it.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 7, 2023
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 7, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @mochizuki875. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 7, 2023
@mochizuki875
Copy link
Contributor Author

/assign @adrianludwin

Copy link
Contributor

@adrianludwin adrianludwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super cool change! At this point, we can save it for v1.2 but I like it :)

Just a few questions before it goes in.

@mochizuki875 mochizuki875 force-pushed the feature_show_hrq_status_by_kubectl branch from b72a635 to 67f99ee Compare June 7, 2023 15:21
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 7, 2023
@mochizuki875 mochizuki875 force-pushed the feature_show_hrq_status_by_kubectl branch 2 times, most recently from 42b2835 to 62f275c Compare June 7, 2023 15:25
@mochizuki875
Copy link
Contributor Author

@adrianludwin
OK, I've fixed it.

@rjbez17
Copy link
Contributor

rjbez17 commented Jun 11, 2023

/ok-to-test

This lgtm but I'll let @adrianludwin have final say.

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 11, 2023
Copy link
Contributor

@adrianludwin adrianludwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

Thanks for this change!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 11, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianludwin, mochizuki875

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 11, 2023
@zfrhv zfrhv mentioned this pull request Jun 11, 2023
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 12, 2023
@mochizuki875 mochizuki875 force-pushed the feature_show_hrq_status_by_kubectl branch from d5c9e28 to 6199bd1 Compare June 12, 2023 02:06
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 12, 2023
@mochizuki875
Copy link
Contributor Author

I've fixed conflict.
Could anyone please add /lgtm again?

@mochizuki875 mochizuki875 force-pushed the feature_show_hrq_status_by_kubectl branch from 6199bd1 to f6b1fbf Compare June 12, 2023 12:16
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 12, 2023
Copy link
Contributor

@adrianludwin adrianludwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 12, 2023
@k8s-ci-robot k8s-ci-robot merged commit 557d86e into kubernetes-retired:master Jun 12, 2023
k8s-ci-robot added a commit that referenced this pull request Jun 12, 2023
@adrianludwin adrianludwin added this to the release-v1.2 milestone Jun 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants