Skip to content

Commit

Permalink
Merge pull request #55148 from dixudx/controller_defaultGC_DeleteDepe…
Browse files Browse the repository at this point in the history
…ndents

Automatic merge from submit-queue (batch tested with PRs 52767, 55065, 55148, 56228, 56221). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

change DefaultGarbageCollectionPolicy to DeleteDependents for workloads controllers

**What this PR does / why we need it**:
As part of the apps/v1 GA effort (kubernetes/enhancements#353) for v1.9. For core controllers, like `Deployment`, `DaemonSet`, `ReplicaSet`, and `StatefulSet`, changing the `DefaultGarbageCollectionPolicy` from `OrphanDependents` to `DeleteDependents` will make these objects consistent with the default behavior for all new objects.

For legacy API versions, the `DefaultGarbageCollectionPolicy` remains `OrphanDependents`.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
ref #55027

**Special notes for your reviewer**:
/cc @enisoc @caesarxuchao @kow3ns
/assign @kubernetes/sig-apps-api-reviews

**Release note**:

```release-note
The default garbage collection policy for Deployment, DaemonSet, StatefulSet, and ReplicaSet has changed from OrphanDependents to DeleteDependents when the deletion is requested through an `apps/v1` endpoint. Clients using older endpoints will be unaffected. This change is only at the REST API level and is independent of the default behavior of particular clients (e.g. this does not affect the default for the kubectl `--cascade` flag).

If you upgrade your client-go libs and use the `AppsV1()` interface, please note that the default garbage collection behavior is changed.
```

Kubernetes-commit: 00b2d95c8665f9680f2c9cffb03cf5a457fdab98
  • Loading branch information
k8s-publish-robot committed Nov 29, 2017
2 parents 4b482d1 + cee6961 commit 9a72229
Show file tree
Hide file tree
Showing 5 changed files with 354 additions and 259 deletions.
Loading

0 comments on commit 9a72229

Please sign in to comment.