Skip to content

orphan when kubectl delete --cascade=false #45661

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

Merged
merged 1 commit into from
May 12, 2017

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented May 11, 2017

The default for new objects is to propagate deletes (use GC) when no deleteoptions are passed. In addition, the vast majority of kube objects use this default. Only a few controllers resources (sts, rc, deploy, jobs, rs) orphan by default. This means that when you do kubectl delete sa/foo --cascade=false you do not orphan. That doesn't fulfill the intent of the command. This explicitly orphans when --cascade=false so we don't use GC.

@fabianofranz
@jwforres I liked this easter egg :)

@kubernetes/sig-cli-bugs we should backport this to 1.6

@k8s-ci-robot k8s-ci-robot added sig/cli Categorizes an issue or PR as relevant to SIG CLI. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 11, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-github-robot k8s-github-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note-label-needed labels May 11, 2017
@0xmichalis
Copy link
Contributor

/lgtm
/release-note-none

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed labels May 11, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, kargakis

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@deads2k deads2k removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 11, 2017
@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 11, 2017
@deads2k deads2k added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 11, 2017
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented May 12, 2017

@deads2k: The following test(s) failed:

Test name Commit Details Rerun command
pull-kubernetes-federation-e2e-gce e91716a link @k8s-bot pull-kubernetes-federation-e2e-gce test this

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-cherrypick-bot
Copy link

Removing label cherrypick-candidate because no release milestone was set. This is an invalid state and thus this PR is not being considered for cherry-pick to any release branch. Please add an appropriate release milestone and then re-add the label.

k8s-github-robot pushed a commit that referenced this pull request May 15, 2017
Automatic merge from submit-queue

[1.6] orphan when kubectl delete --cascade=false

Cherry-pick of #45661

```release-note
Fix `kubectl delete --cascade=false` for resources that don't have legacy overrides to orphan by default.
```
@deads2k deads2k deleted the cli-11-delete branch August 3, 2017 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/cli Categorizes an issue or PR as relevant to SIG CLI. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants