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

change resource quota name #275 #301

Conversation

keisukesakasai
Copy link

@keisukesakasai keisukesakasai commented Jun 19, 2023

What this PR does it:

I have renamed the name of the Resource Quotas created from HRQ.
Originally, the name of the ResourceQuotas was hrq.hnc.x-k8s.io, but it has been changed to local-impl.hnc.x-k8s.io as part of this update.
Please refer to this link: #275 (comment).

Operation confirmation:

I have confirmed that the name of the Resource Quota created from HRQ is local-impl-hrq.hnc.x-k8s.io.

The confirmation steps are as follows.

  • Create parent-child relationships between namespaces as usual.
  • Create HRQ.
  • Confirm the names of ResourceQuotas created from HRQ for each namespace.

ns relationship:

k hns tree parent
parent
└── [s] child

create HRQ:

kubectl apply -f - << EOF
apiVersion: hnc.x-k8s.io/v1alpha2
kind: HierarchicalResourceQuota
metadata:
  name: parent-hrq
  namespace: parent
spec:
  hard:
    limits.memory: 500Mi
    requests.memory: 500Mi
    limits.cpu: "2"
    requests.cpu: "2"
EOF
hierarchicalresourcequota.hnc.x-k8s.io/parent-hrq createdk get hrq -nparent
NAME         REQUEST                                       LIMIT
parent-hrq   requests.cpu: 0/2, requests.memory: 0/500Mi   limits.cpu: 0/2, limits.memory: 0/500Mi

Check the names of the ResourceQuotas created from HRQ:

k get resourcequotas -nparent
NAME                          AGE   REQUEST                                       LIMIT
local-impl-hrq.hnc.x-k8s.io   54s   requests.cpu: 0/2, requests.memory: 0/500Mi   limits.cpu: 0/2, limits.memory: 0/500Mik get resourcequotas -nchild
NAME                          AGE    REQUEST                                       LIMIT
local-impl-hrq.hnc.x-k8s.io   115s   requests.cpu: 0/2, requests.memory: 0/500Mi   limits.cpu: 0/2, limits.memory: 0/500Mi

Tested:

Unit and E2E tests has passed.

Which issue(s) this PR fixes:

#275

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 19, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: keisukesakasai / name: Keisuke SAKASAI (35d188f)

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: keisukesakasai
Once this PR has been reviewed and has the lgtm label, please assign srampal for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 requested review from rjbez17 and srampal June 19, 2023 09:18
@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 19, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @keisukesakasai. 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 size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jun 19, 2023
@keisukesakasai keisukesakasai changed the title 🔧 Change resource quota name change resource quota name #275 Jun 19, 2023
@mochizuki875
Copy link
Contributor

/ok-to-test

@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 19, 2023
@mochizuki875
Copy link
Contributor

/lgtm
/assign @adrianludwin

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

@adrianludwin please take a look? thx!

@adrianludwin
Copy link
Contributor

adrianludwin commented Jun 29, 2023 via email

@adrianludwin
Copy link
Contributor

Sorry for disappearing again...

I'm having second thoughts about this - firstly (and most importantly), this doesn't clean up any existing hrq resource quotas, so this will leave a bunch of stranded RQs around. We could fix that, but I'm not sure it's worth the trouble? Especially now that #283 has been merged.

If anything, perhaps we could add some kind of annotation with a human-readable message basically saying "don't read this."

@mochizuki875
Copy link
Contributor

@adrianludwin

this doesn't clean up any existing hrq resource quotas, so this will leave a bunch of stranded RQs around.

As you said, compatibility is important and this may cause breaking changes.
So I agree with your idea.(leaving it alone)

And I think we should add some annotations to HRQ document.
For example, add here with clarifying the RQ name hrq.hnc.x-k8s.io:

https://github.com/kubernetes-sigs/hierarchical-namespaces/blob/74fe01460083fd410a8fbd728eb255c4d728dbcb/docs/user-guide/concepts.md?plain=1#L284-L286

https://github.com/kubernetes-sigs/hierarchical-namespaces/blob/74fe01460083fd410a8fbd728eb255c4d728dbcb/docs/user-guide/quickstart.md?plain=1#L517

@keisukesakasai
What do you think?

@adrianludwin
Copy link
Contributor

Hey @mochizuki875 that sounds like a good idea, thanks!

@rjbez17
Copy link
Contributor

rjbez17 commented Oct 26, 2023

@mochizuki875 are we abandoning this?

@mochizuki875
Copy link
Contributor

@rjbez17
Yes, so we should close this PR.
/close

@k8s-ci-robot
Copy link
Contributor

@mochizuki875: Closed this PR.

In response to this:

@rjbez17
Yes, so we should close this PR.
/close

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants