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

kep-1979: add object bucket quota to design #4196

Closed

Conversation

BlaineEXE
Copy link

Add initial bucket quota support to the Container Object Storage Interface (COSI) design KEP. This is an incremental improvement to the specification based on early user feedback.

  • One-line PR description: add bucket quota support to COSI design
  • Other comments:

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory sig/storage Categorizes an issue or PR as relevant to SIG Storage. labels Sep 7, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @BlaineEXE!

It looks like this is your first PR to kubernetes/enhancements 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/enhancements has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@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 Sep 7, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @BlaineEXE. Thanks for your PR.

I'm waiting for a kubernetes 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
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BlaineEXE
Once this PR has been reviewed and has the lgtm label, please assign msau42 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 added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 7, 2023
Comment on lines -164 to +172
- BucketClaims/Bucket are similar to PVC/PV.
- BucketClaim is used to request generation of new buckets.
- Buckets represent the actual Bucket.
- BucketClaims/Bucket are similar to PVC/PV.
- BucketClaim is used to request generation of new buckets.
- Buckets represent the actual Bucket.
Copy link
Author

Choose a reason for hiding this comment

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

Looks like my editor is automatically cleaning up a bunch of whitespace all through the doc

Comment on lines 547 to 554
Rook users have requested the ability to limit the max size of buckets as the max number of objects in a bucket.
However, adding this to the COSI API spec may be problematic.

When a user deletes a BucketAccess, the corresponding secret/serviceaccount are also deleted. If a pod has that secret mounted when delete is called, then a finalizer on the secret will prevent it from being deleted. Instead, the deletionTimestamp will be set on the secret. In this way, access to a Bucket is preserved until the application pod dies.
Amazon's S3 service does not seem to implement either of those quotas. Either by their
[quota mechanism](https://docs.aws.amazon.com/general/latest/gr/s3.html) or by their
[bucket policy mechanism](https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html).

When an admin deletes any of the class objects, it does not affect existing Buckets as fields from the class objects are copied into the Buckets during creation.
These particular quotas may not be a good fit for the COSI design. :(
Copy link
Author

@BlaineEXE BlaineEXE Sep 7, 2023

Choose a reason for hiding this comment

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

This is unfortunate, but I wonder if it would still be beneficial to continue with some comments about quotas, even if the guidance is that the opaque parameters should be used on a per-provider basis.

[addendum]
This might be a good time to make some mention of explicitly relying on ResourceQuotas to control the number of Buckets, BucketClaims, or BucketAccesses for users, specifically or generally.
[/addendum]

Alternatively the COSI design could include these as official API and make the implementation of them optional for backends. To do that, we would probably want to follow some sort of mechanism for querying/reporting supported functionality, similar to this in CSI: https://kubernetes-csi.github.io/docs/support-fsgroup.html#supported-modes

@xing-yang
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 Sep 13, 2023
Quotas are proving to be an oft-requested feature for COSI. While a set
of common, portable quotas has yet to be identfied, COSI can still
provide guidance for driver vendors on how to support vendor-specific
quotas. COSI can also describe how administrators may work within the
bounds of COSI's spec to accomplish commonly-requested goals.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
Below are some examples of how to achieve the desired outcome within the bounds of what COSI is able to provide. Be mindful that implementing these options will add difficulty (sometimes substantial) when porting applications between different cloud environments.

* The administrator may create an array of Bucket(Access)Classes and allow users to self-select the closest provided option that matches their needs.
* If that is too limiting, administrators may create a web form or custom controller that can create a custom Bucket(Access)Class for a user on-demand.
Copy link
Contributor

Choose a reason for hiding this comment

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

Take a look at the VolumeAttributesClass KEP: #3780

Copy link
Contributor

Choose a reason for hiding this comment

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

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 31, 2024
@BlaineEXE BlaineEXE closed this Feb 5, 2024
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. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. sig/storage Categorizes an issue or PR as relevant to SIG Storage. 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.

4 participants