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

Sweep for calls to delete that result in orphaning dependents #71807

liggitt opened this Issue Dec 6, 2018 · 2 comments


None yet
3 participants

liggitt commented Dec 6, 2018

What happened:

Several resources default to orphaning dependents for backwards compatibility:

  • daemonsets in extensions/v1beta1, apps/v1beta2
  • deployments in extensions/v1beta1, apps/v1beta1, apps/v1beta2
  • replicasets in extensions/v1beta1, apps/v1beta2
  • statefulsets in apps/v1beta1, apps/v1beta2
  • jobs in batch/v1
  • cronjobs in batch/v1beta1, batch/v2alpha1
  • replicationcontrollers in v1

Calls made via client-go to delete these resource via these versions which do not specify a deletion propagation policy default to orphaning dependents. For controller-deleted resources, this is almost always not what we want.

A specific example of this was #71772 that deleted jobs and accidentally orphaned pods.

We should sweep controller calls that delete the resources/versions listed above without specifying a deletion propagation policy and decide what policy is expected. In general, I would expect controllers to use background deletion propagation.

/kind bug


This comment has been minimized.


liggitt commented Dec 6, 2018


This comment has been minimized.


adohe commented Dec 8, 2018

cc @adohe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment