Files
kubernetes/pkg/util
Kubernetes Submit Queue 14362160ba Merge pull request #38665 from ymqytw/fix_list_of_primitives
Automatic merge from submit-queue (batch tested with PRs 39834, 38665)

Use parallel list for deleting items from a primitive list with merge strategy

Implemented parallel list for deleting items from a primitive list with merge strategy. Ref: [design doc](https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#list-of-primitives)

fixes #35163 and #32398

When using parallel list, we don't need to worry about version skew.
When an old APIServer gets a new patch like:
```yaml
metadata:
  $deleteFromPrimitiveList/finalizers:
  - b
  finalizers:
  - c
```
It won't fail and work as before, because the parallel list will be dropped during json decoding.

Remaining issue: There is no check when creating a set (primitive list with merge strategy). Duplicates may get in.
It happens in two cases:
1) Creation using POST
2) Creating a list that doesn't exist before using PATCH

Fixing the first case is the beyond the scope of this PR.
The second case can be fixed in this PR if we need that.

cc: @pwittrock @kubernetes/kubectl @kubernetes/sig-api-machinery 

```release-note
Fix issue around merging lists of primitives when using PATCH or kubectl apply.
```
2017-01-12 20:03:23 -08:00
..
2017-01-11 09:09:48 -05:00
2017-01-05 14:14:13 -08:00
2017-01-11 09:09:48 -05:00
2017-01-05 14:14:13 -08:00
2017-01-05 14:14:13 -08:00
2017-01-11 09:09:48 -05:00
2017-01-05 14:14:13 -08:00
2017-01-11 09:09:48 -05:00
2017-01-05 14:14:13 -08:00
2017-01-05 14:14:13 -08:00
2017-01-11 09:09:48 -05:00
2017-01-11 09:09:48 -05:00
2017-01-05 14:14:13 -08:00
2017-01-11 09:09:48 -05:00
2017-01-05 14:14:13 -08:00
2017-01-11 09:09:48 -05:00
2017-01-11 09:09:48 -05:00
2017-01-11 09:09:48 -05:00
2017-01-11 09:09:48 -05:00
2017-01-11 09:09:48 -05:00
2017-01-11 09:09:48 -05:00
2017-01-05 14:14:13 -08:00
2017-01-11 09:09:48 -05:00
2017-01-11 09:09:48 -05:00
2017-01-11 09:09:48 -05:00
2017-01-12 10:21:05 +08:00
2017-01-05 14:14:13 -08:00
2017-01-11 09:09:48 -05:00
2017-01-11 09:09:48 -05:00
2017-01-05 14:14:13 -08:00
2017-01-11 09:09:48 -05:00
2017-01-11 09:09:48 -05:00
2017-01-12 15:01:38 -08:00
2017-01-11 09:09:48 -05:00
2017-01-11 09:09:48 -05:00
2017-01-11 09:09:48 -05:00
2017-01-11 09:09:48 -05:00
2017-01-11 09:09:48 -05:00
2017-01-11 09:09:48 -05:00
2017-01-11 09:09:48 -05:00
2017-01-11 09:09:48 -05:00
2017-01-11 15:20:36 -05:00
2016-07-16 13:48:21 -04:00
2017-01-11 09:09:48 -05:00