-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Add a client flag to delete "--now" for grace period 0 #23756
Conversation
Description should probably say kubectl instead of oc 😄 |
We should have called kubectl kc |
GCE e2e build/test passed for commit 686a132dbea7ed0095614dbdd5fc76786823a1f4. |
686a132
to
0cac013
Compare
GCE e2e build/test passed for commit 0cac01345dc9a152c4ea41abb1fc6f977f3d3eb7. |
Can you also add an example? cc: @kubernetes/kubectl |
0cac013
to
5df2a39
Compare
GCE e2e build/test passed for commit 5df2a394a443e38212c0c83202781216fcf980a1. |
@smarterclayton |
GCE e2e build/test passed for commit 5df2a394a443e38212c0c83202781216fcf980a1. |
I don't think I want to use the As an example of things you want to protect, I could imagine someone deciding to protect serviceaccount/foo because they're using that one to run some maintenance script. I'd say this is also the exact case that was "solved" with |
Force is saying "delete with grace period 0 without waiting for it to The user expectation that needs to be managed is "I tried to delete this, On Wed, Apr 6, 2016 at 8:40 AM, David Eads notifications@github.com wrote:
|
Correct. Since the concept doesn't exist yet, I felt like I had to describe it. I would prefer to have the concept of protected resources, in which case |
--force is about ignoring or working around conflicts. |
--now would be similar to |
5df2a39
to
1481572
Compare
Updated On Wed, Apr 6, 2016 at 5:48 PM, Brian Grant notifications@github.com
|
@smarterclayton @bgrant0607 in the future, do you expect "--grace-period=0" and "--now" to mean different things? #23656 is proposing adding finalizers to resources. In that context, I would imagine for the deletion of a pod, "--now" means |
Would removing finalizers be a thing regular users can do? On Wed, Apr 6, 2016 at 6:09 PM, Chao Xu notifications@github.com wrote:
|
GCE e2e build/test passed for commit 148157211f020fcb0ad1b3d104f4d3eab8a8495a. |
Yes, I think it's necessary. If a deletion is stuck because a finalizer is not responsive, a user should be able to remove the finalizer manually. |
@caesarxuchao Good point, but may need to work through some use cases to understand whether removing finalizers would be acceptable. I suggest we work that out in the cascading deletion proposal rather than here. For example, blanket finalizer removal could conflict with another flag to indicate whether children should be orphaned. Finalizers might need to be handled on a case-by-case basis. |
What if the finalizer is a link to an external system of record? I
had assumed initializers are owned by the platform and not the end
user, but had not considered finalizers as user driven
|
Is equivalent to --grace-period=0 but is more intuitive for end users.
1481572
to
ea3467f
Compare
GCE e2e build/test passed for commit ea3467f. |
gracePeriod := cmdutil.GetFlagInt(cmd, "grace-period") | ||
if cmdutil.GetFlagBool(cmd, "now") { | ||
if gracePeriod != -1 { | ||
return fmt.Errorf("--now and --grace-period cannot be specified together") |
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.
we can allow --now
and --grace-period=0
to be set together (although it's redundant)
Please update the PR title and description to |
Do we want to encourage users to do that? Why would a user ever set them On Fri, Apr 8, 2016 at 1:46 AM, Janet Kuo notifications@github.com wrote:
|
@smarterclayton I agree. |
Any other comments on this? |
lgtm |
@smarterclayton how picky are we on release notes? I labelled it that way just in case we want to note every CLI change, but let me know if that's not the case. |
GCE e2e build/test passed for commit ea3467f. |
It's a usability improvement so I think it's deserved. |
GCE e2e build/test passed for commit ea3467f. |
…ed_again Bug 1747377: UPSTREAM: 73863: Fix code to handle delayed binding volumes Origin-commit: b05811ee34b081c7f3504d0701f02d25181f3e42
Is equivalent to --grace-period=0 but is more intuitive for end users.
Stuck pod?