GoogleCloudPlatform / metacontroller

Lightweight Kubernetes controllers as a service
https://metacontroller.app/
Apache License 2.0
792 stars 105 forks source link

Always delete children with cascading deletion. #146

Closed enisoc closed 5 years ago

enisoc commented 5 years ago

For most API types, the server-side default (when the client doesn't specify) is cascading deletion, meaning that the GC will clean up children owned by the object being deleted. For some legacy APIs like Job that went GA before the server-side GC was added, the default is instead orphaning, to maintain backwards compatibility.

Now that server-side cascading deletion (GC) is the norm, users expect it to happen uniformly. Therefore, we should explicitly request cascading deletion whenever we delete children in Metacontroller, in case the server-side default is different for legacy reasons.

Fixes #145

crimsonfaith91 commented 5 years ago

/lgtm Should we leave a release note for this change?

enisoc commented 5 years ago

Yes, this needs a release note. I write the release notes manually by reading the entire list of commits, so there's no additional action needed besides merging the PR. :)