Re: [kubernetes/kubernetes] Unable to delete stale objects with `kubectl apply --prune` when no object passed in. (#40635)

166 views
Skip to first unread message

Zihong Zheng

unread,
Jan 27, 2017, 6:11:04 PM1/27/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

cc @ymqytw @kubernetes/sig-cli-misc


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Mengqi Yu

unread,
Jan 27, 2017, 6:51:02 PM1/27/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Original discussion in PR #33075

caleb miles

unread,
Jan 30, 2017, 7:27:37 PM1/30/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Is there someone from @kubernetes/sig-cli-bugs that can help triage this issue and own it? Thanks!

cc: @mikedanese, @errordeveloper, @lukemarsden

Mengqi Yu

unread,
Feb 1, 2017, 8:01:22 PM2/1/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

cc: @pwittrock @liggitt
What is the expected behavior?
Should we delete all the resources that matching the labels, even though 0 files passed in (with -f) match the labels?

Jordan Liggitt

unread,
Feb 1, 2017, 9:51:34 PM2/1/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

apply --prune globally searches for all existing resources and deletes them if they don't exist in the referenced files? that seems really easy to fat-finger a huge deletion.

Zihong Zheng

unread,
Feb 1, 2017, 11:19:40 PM2/1/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

I think a sane semantic may be "delete objects that don't exist in this path, but were created by the same user before using kubectl apply in the same path".

Jordan Liggitt

unread,
Feb 1, 2017, 11:25:11 PM2/1/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

the creating user is not stored in the API, so that data is not available to make decisions based on. I'm not sure what you mean by "in the same path"

Zihong Zheng

unread,
Feb 1, 2017, 11:43:03 PM2/1/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Yeah that data is not available on apiserver. By "in the same path" I mean this user is manipulating the same set of files --- objects created by kubectl apply -f /objects/folder will only be pruned by kubectl apply -f /objects/folder --prune if the referenced files are deleted, but not by kubectl apply -f /other/folder --prune.

BTW #33075/comment maybe relevant.

Mengqi Yu

unread,
Mar 8, 2017, 6:43:50 PM3/8/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@calebamiles We are not going to fix this in 1.6. We will do that in 1.7
cc: @pwittrock

fejta-bot

unread,
Dec 21, 2017, 9:30:31 PM12/21/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

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.

Prevent issues from auto-closing with an /lifecycle frozen comment.

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

James Wen

unread,
Jan 5, 2018, 5:10:51 PM1/5/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Bumping that this issue is one we're interested in. Use case is in #57916

Ilya Dmitrichenko

unread,
Jan 22, 2018, 6:24:29 AM1/22/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

/remove-lifecycle stale

fejta-bot

unread,
Apr 22, 2018, 7:59:33 AM4/22/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

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

George Kraft

unread,
Apr 23, 2018, 9:01:35 AM4/23/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

/remove-lifecycle stale

fejta-bot

unread,
Jul 22, 2018, 9:42:22 AM7/22/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

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

George Kraft

unread,
Jul 23, 2018, 8:29:52 AM7/23/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

/remove-lifecycle stale

fejta-bot

unread,
Oct 21, 2018, 9:02:17 AM10/21/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

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

Joost Cassee

unread,
Oct 21, 2018, 9:25:33 AM10/21/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

/remove-lifecycle stale

Ijaz ahmad

unread,
Dec 21, 2018, 10:39:25 AM12/21/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Same issue , k8s version 1.12 , client 1.13

the resources matching the label are still there and prune doesnt work.

fejta-bot

unread,
Mar 21, 2019, 11:41:46 AM3/21/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

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

Joost Cassee

unread,
Mar 21, 2019, 7:59:05 PM3/21/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

/remove-lifecycle stale

fejta-bot

unread,
Sep 9, 2019, 10:10:33 PM9/9/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

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

fejta-bot

unread,
Oct 9, 2019, 10:56:21 PM10/9/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

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


You are receiving this because you are on a team that was mentioned.

Reply to this email directly, view it on GitHub, or unsubscribe.

fejta-bot

unread,
Nov 8, 2019, 10:39:08 PM11/8/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.


Mark the issue as fresh with /remove-lifecycle rotten.

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

Kubernetes Prow Robot

unread,
Nov 8, 2019, 10:39:27 PM11/8/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

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

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.

Kubernetes Prow Robot

unread,
Nov 8, 2019, 10:39:30 PM11/8/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Closed #40635.

Jacob Henner

unread,
Apr 27, 2020, 3:15:46 PM4/27/20
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

/reopen /remove-lifecycle rotten

Reply all
Reply to author
Forward
0 new messages