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-0661: StatefulSet volume resize #1848

Closed
wants to merge 1 commit into from

Conversation

kk-src
Copy link

@kk-src kk-src commented Jun 8, 2020

StatefulSet volume resize
This enhancement proposes to add the ability to resize volumes associated with StatefulSet via modifications to it's specification.

StatefulSet via modifications to it's specification.

Feature tracking issue: #661

Modified and updated version of #660

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 8, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @kk-src!

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
Copy link
Contributor

Hi @kk-src. 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 k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jun 8, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kk-src
To complete the pull request process, please assign jsafrane
You can assign the PR to them by writing /assign @jsafrane in a comment when ready.

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 msau42 and saad-ali June 8, 2020 22:09
@k8s-ci-robot k8s-ci-robot added kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/storage Categorizes an issue or PR as relevant to SIG Storage. labels Jun 8, 2020
@kk-src
Copy link
Author

kk-src commented Jun 8, 2020

/sig apps

@k8s-ci-robot k8s-ci-robot added the sig/apps Categorizes an issue or PR as relevant to SIG Apps. label Jun 8, 2020
@kk-src
Copy link
Author

kk-src commented Jun 8, 2020

/cc @gnufied @kow3ns @msau42

@k8s-ci-robot k8s-ci-robot requested review from gnufied and kow3ns June 8, 2020 22:12
@kk-src
Copy link
Author

kk-src commented Jun 8, 2020

/cc @SidakM-zz

@k8s-ci-robot
Copy link
Contributor

@kk-src: GitHub didn't allow me to request PR reviews from the following users: SidakM-zz.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @SidakM-zz

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.

Copy link
Member

@kow3ns kow3ns left a comment

Choose a reason for hiding this comment

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

The remaining sections need to be filled out.
We need to think about remediating failure conditions and community user errors when the PVC update fails. We need to think more closely around concurrent and sequential mutations to other part's of the spec and how this interacts with reconciliation during a rollout (replicas, podTemplate). Also how would you deal with storage providers that implement online file system resizing (Imo we should just use an "immutable infra" approach and destroy and recreate the Pod when its volume is resized, but that is just my opinion).

The following changes are proposed to achieve the goal:
1. Make the `volumeClaimTemplates` storage size editable by modification to the api server
validation.
2. Add reconciliation of the associated PVC's size and the individual `volumeClaimTemplates`
Copy link
Member

Choose a reason for hiding this comment

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

Consider indicating that we will need to add general PVC syncing.


Currently, PVC resize does not support shrinking the volume. Also, some environments require Pod restarts inorder
to get access to the resized volume. This proposal does not try to address these scenarios but relies on the
underlying PVC resize logic to take the appropriate action or indicate error as needed.
Copy link
Member

Choose a reason for hiding this comment

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

Should call out that modifying the storage class of the volumeClaimsTemplate is a non-goal as well.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you, @kow3ns. Will add this.


### Risks and Mitigations

Currently, shrinking the PVC size is not supported and the same will apply to StatefulSet changes. There
Copy link
Member

Choose a reason for hiding this comment

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

Consider implementing the validation in the API Machinery. If shrinking the volume will not be supported then the validation for volumesClaimTemplate field should explicitly reject the mutation.

the corresponding PVC events. StatefulSet would only report any failures in the update operation
performed to the PVC object.

### Revision control
Copy link
Member

@kow3ns kow3ns Jun 11, 2020

Choose a reason for hiding this comment

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

So this has some implications for rollback and failure detection. This needs more thought. If we modify the volume size and the controller wedges midway in the rollout due to a failure, what would the remediation strategy be? There is no roll back to a previous revision. If the user modifies the spec of the StatefulSet to have the smaller volume size to attempt a rollback, that will not be possible either (i.e. no shrinking).

Copy link
Member

Choose a reason for hiding this comment

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

Not true shrinking but a mechanism to allow user to cancel a previously issued volume expansion is in works - #1790 . This requires users to reduce PVC size to previous capacity if they want to cancel the expansion.

@gnufied
Copy link
Member

gnufied commented Jul 29, 2020

/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 Jul 29, 2020
@gnufied
Copy link
Member

gnufied commented Jul 29, 2020

paging Jordan since he previously reviewed similar KEP.

/assign @liggitt

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/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 Oct 27, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Nov 26, 2020
@msau42
Copy link
Member

msau42 commented Dec 1, 2020

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Dec 1, 2020
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

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 Mar 1, 2021
@gnufied
Copy link
Member

gnufied commented Mar 1, 2021

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 1, 2021
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

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 May 30, 2021
@iTaybb
Copy link

iTaybb commented May 30, 2021 via email

@nunosilva800
Copy link

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 1, 2021
@cndoit18
Copy link
Member

cndoit18 commented Jun 1, 2021

For me, it was much needed. 👍

@k8s-triage-robot
Copy link

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

This bot triages issues and 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 issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or 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 Aug 30, 2021
@iTaybb
Copy link

iTaybb commented Aug 30, 2021

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 30, 2021
@m-yosefpor
Copy link

should we close this in favor of #2842 ?

@xing-yang
Copy link
Contributor

should we close this in favor of #2842 ?

I checked with @kk-src earlier and he is fine to have this KEP closed and a new KEP submitted.

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 ok-to-test Indicates a non-member PR verified by an org member that is safe to test. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.