k3s/pkg
Kubernetes Submit Queue ce8a6285df
Merge pull request #67635 from nikhita/customresource-subresource-patch-04
Automatic merge from submit-queue (batch tested with PRs 67298, 67518, 67635, 67673). 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>.

Fix unstructured metadata accessors to respect omitempty semantics

Fixes #67541
Fixes #48211 
Fixes #49075
Follow up of #67562

`ObjectMeta` has fields with `omitempty` json tags. This means that when the fields have zero values, they should not be persisted in the object.

Before this PR, some of the metadata accessors for unstructured objects did not respect these semantics i.e they would persist a field even if it had a zero value.

This PR updates the accessors so that the field is removed from the unstructured object map if it contains a zero value.

/sig api-machinery
/kind bug
/area custom-resources
/cc sttts liggitt yue9944882 roycaihw 
/assign sttts liggitt 

**Release note**:

```release-note
NONE
```
2018-08-21 18:33:07 -07:00
..
api Allow headless svc without ports to have endpoints 2018-08-21 08:36:27 -07:00
apis Add Labels to various OWNERS files 2018-08-21 13:59:08 -04:00
auth
capabilities
client Merge pull request #66722 from luxas/reference_new_generic_structs 2018-08-14 22:43:22 -07:00
cloudprovider Add Labels to various OWNERS files 2018-08-21 13:59:08 -04:00
controller Merge pull request #67672 from dims/add-labels-to-owners-files 2018-08-21 14:37:21 -07:00
credentialprovider
features Merge pull request #67077 from vikaschoudhary16/scope-selectors-beta 2018-08-09 19:31:04 -07:00
fieldpath
generated run "make update" 2018-07-30 15:56:39 +08:00
kubeapiserver Merge pull request #67497 from yue9944882/refactor/externalize-node-informer-clientset 2018-08-21 13:00:01 -07:00
kubectl Merge pull request #67635 from nikhita/customresource-subresource-patch-04 2018-08-21 18:33:07 -07:00
kubelet Merge pull request #67518 from tallclair/runtimeclass-cri 2018-08-21 18:33:04 -07:00
kubemark update bazel 2018-08-16 09:59:33 +08:00
master Add sig/api-machinery label to apimachinery OWNERS files 2018-08-20 18:46:47 +05:30
printers Merge pull request #67658 from soltysh/staging_cli_runtime 2018-08-21 16:20:55 -07:00
probe
proxy Add Labels to various OWNERS files 2018-08-21 13:59:08 -04:00
quota Add sig/api-machinery label to apimachinery OWNERS files 2018-08-20 18:46:47 +05:30
registry Merge pull request #67372 from tanshanshan/priority-814 2018-08-16 10:34:15 -07:00
routes
scheduler Merge pull request #66862 from resouer/sync-map 2018-08-21 00:24:01 -07:00
security
securitycontext
serviceaccount
ssh
util Merge pull request #66639 from hanxiaoshuai/fix07251 2018-08-19 22:40:00 -07:00
version
volume Add Labels to various OWNERS files 2018-08-21 13:59:08 -04:00
watch/json
windows/service
.import-restrictions
BUILD util for external pv 2018-08-17 11:14:42 +08:00
OWNERS