Skip to content
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

Resource Quota Per VolumeAttributesClass #50082

Open
wants to merge 1 commit into
base: dev-1.33
Choose a base branch
from

Conversation

carlory
Copy link
Member

@carlory carlory commented Mar 13, 2025

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 13, 2025
@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Mar 13, 2025
@k8s-ci-robot k8s-ci-robot requested a review from salaxander March 13, 2025 04:06
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign reylejano for approval. For more information see the 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 added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 13, 2025
Copy link

netlify bot commented Mar 13, 2025

👷 Deploy Preview for kubernetes-io-vnext-staging processing.

Name Link
🔨 Latest commit f26e212
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/67dcda6be41eba0008a54305

@carlory carlory force-pushed the resource-quota-per-volumeattributesclass branch from 708ff9a to 55ef80c Compare March 13, 2025 04:07
Copy link

netlify bot commented Mar 13, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 708ff9a
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/67d259d0eb1e730008d06599
😎 Deploy Preview https://deploy-preview-50082--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Mar 13, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit f26e212
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/67dcda6b26ecba00086154a9
😎 Deploy Preview https://deploy-preview-50082--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@carlory carlory force-pushed the resource-quota-per-volumeattributesclass branch 2 times, most recently from 8338b08 to 69060d9 Compare March 13, 2025 05:59
@carlory
Copy link
Member Author

carlory commented Mar 13, 2025

@sunnylovestiramisu
Copy link
Contributor

/assign


The PVC references the associated volume attributes class by the following fields:

* `spec.volumeAttributesClassName`
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add an explanation that these three fields will be all calculated against the quota?

Copy link
Member Author

@carlory carlory Mar 13, 2025

Choose a reason for hiding this comment

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

it is explained at line 467 and 475

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant giving an example like here: kubernetes/enhancements#5028 (comment)

Copy link
Member Author

@carlory carlory Mar 14, 2025

Choose a reason for hiding this comment

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

@carlory
Copy link
Member Author

carlory commented Mar 13, 2025

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 13, 2025
name: pvcs-silver
spec:
hard:
requests.storage: "20Gi"
Copy link
Member

Choose a reason for hiding this comment

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

But this quota handling doesn't do anything to prevent creation of more than 20Gi volumes that use VAC silver. Why would we mention it? I am confused.

Copy link
Member Author

Choose a reason for hiding this comment

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

It is an arbitrary value, not special meaning. The quota will be used in the above example. Do you mean that it is better to use the same hard setting for these quota objects. I'm okay to change it if you think it is better.

Copy link
Member Author

@carlory carlory Mar 14, 2025

Choose a reason for hiding this comment

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

when you change the desired vac and capacity of the existing pvc, it will be rejected if the new capacity is larger than the quota. In the above example, I didn't show this case. The example is used to tell users which quota is changed or not when the pvc is updated.

@carlory carlory force-pushed the resource-quota-per-volumeattributesclass branch from 69060d9 to 56cd64b Compare March 14, 2025 07:42
Copy link

@rburrs rburrs left a comment

Choose a reason for hiding this comment

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

lines 575 & 612:
remove backticks enclosing kubectl commands

@carlory
Copy link
Member Author

carlory commented Mar 21, 2025

lines 575 & 612:
remove backticks enclosing kubectl commands

@rburrs It follows the same style as https://kubernetes.io/docs/concepts/policy/resource-quotas/#resource-quota-per-priorityclass

requests.storage 0 30Gi
```

Let's change it to "copper" with `kubectl patch`.
Copy link

Choose a reason for hiding this comment

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

remove backticks enclosing kubectl command

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

requests.storage 0 30Gi
```

Once the PVC is bound, it is allowed to modify the desired volume attributes class. Let's change it to "silver" with `kubectl patch`.
Copy link

Choose a reason for hiding this comment

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

remove backticks enclosing kubectl command

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

@carlory carlory force-pushed the resource-quota-per-volumeattributesclass branch from 57fb863 to f26e212 Compare March 21, 2025 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants