-
Notifications
You must be signed in to change notification settings - Fork 14k
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 1847 StatefulSet autodelete documentation #30597
Conversation
👷 Deploy Preview for kubernetes-io-vnext-staging processing. 🔨 Explore the source changes: 40e06a6 🔍 Inspect the deploy log: https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/61a7d0a2c815670007ffe3d9 |
/assign @nate-double-u |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi.
Here's some suggestions. I hope they make sense and help the page improve.
I haven't tested them so there is a chance I've made a Markdown error. If so, sorry about that.
Thanks! They mostly make good sense. I'll commit them through github, then see if I can run a local server to double-check the markdown. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This'll need tech review from SIG Apps, as I haven't checked at all that this matches the actual behavior in code (should be a quick sign off, though).
@mattcary I reckon it'd be OK to squash commits at this point. |
Thanks! Commits squashed, after some amount of git submodules struggling to get the local server to work :-/ /assign @smarterclayton |
/sig apps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Markdown LGTM too. Any remaining feedback on that side looks like nits.
For each policy that you can configure, you can set the value to either `Delete` or `Retain`. | ||
|
||
`Delete` | ||
: The PVCs created from the StatefulSet `volumeClaimTemplate` are deleted, for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comma is a bit weird here but that may just be me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks about the same to me, so I'll take it out :-)
`Delete` | ||
: The PVCs created from the StatefulSet `volumeClaimTemplate` are deleted, for | ||
each Pod affected by the policy. With the `whenDeleted` policy, as all Pods are | ||
deleted when the Statefulset is deleted, all PVCs from the `volumeClaimTemplate` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This clause as all Pods are deleted when the Statefulset is deleted
is a bit difficult to follow. Might suggest
With the
whenDeleted
policy, each PVC from thevolumeClaimTemplate
will be deleted after the corresponding pod is deleted. [ed: you may want to describe exactly the ordering here - does is the ordering dependent on the foreground policy? Does the controller wait until it observes the pod is fully deleted? These help clarify how someone knows what to debug when it goes wrong].
(see my editor note, I think we should clarify the time order in words of what waits before what)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improved the wording, or tried to, in the context of your comment below.
PVC’s pod, and you usually don’t want Pod deletions to remove the associated PVCs. This means that the | ||
StatefulSet controller must wait for scale-down events (when the StatefulSet replica count is changed | ||
to be less than the number of replicas currently in the cluster), and then sets pod owner references | ||
only on the specific Pods that are due to be terminated due to the scale-down action. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh... reading this sounds complicated :). Does this mean that the stateful set controller during a restart can "lose" a scale down event? Or is the event caught because there is a PVC still there when the controller restarts? As a user, I need to know whether force deleting a pod while the controller is down will result in the PVC being left around or not (probably as an api reviewer too :)), and this paragraph doesn't quite give clarity on that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarified, hopefully.
9233725
to
bc8803c
Compare
associated StatefulSet template PVCs, before the Pod is deleted. This causes the PVCs | ||
to be garbage collected after only the condemned Pods have terminated. | ||
|
||
This meanas that if the controller crashes and restarts, no Pod will be deleted before its |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo means
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops thx
lgtm and content is good (one typo), thanks |
/lgtm |
LGTM label has been added. Git tree hash: bd7cc8a92d13a8da773e65c04c4d49d9ddaafd34
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jlbutler 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 |
KEP 1847
Implementation PR #99728