kubernetes/pkg
Kubernetes Submit Queue d0735b90d4 Merge pull request #48065 from ironcladlou/unstructured-field-fix
Automatic merge from submit-queue (batch tested with PRs 48183, 45611, 48065)

Fix Unstructured field accessor

Fix the Unstructured GetDeletionGracePeriodSeconds accessor which was
always returning nil regardless of the underlying stored value. The
field value always appearing nil prevents Custom Resource instances
from being deleted when garbage collection is enabled for CRs and
when DeletePropagationOrphan is used. More generally, this fix means that
delete-on-update now works for CR instances.

Add some test coverage for Unstructured metadata deserialization.

The Unstructured DeletionGracePeriodSeconds field marshals as a value
type from JSON and as a pointer type via SetDeletionGracePeriodSeconds.
The GetDeletionGracePeriodSeconds method now supports handling both
int64 and *int64 values so that either underlying value can be returned.

Add a reflection-based unit test which attempts to exercise all the
Object Get/Set methods for nil handling.

```release-note
Registries backed by the generic Store's `Update` implementation support delete-on-update, which allows resources to be automatically deleted during an update provided:

* Garbage collection is enabled for the Store
* The resource being updated has no finalizers
* The resource being updated has a non-nil DeletionGracePeriodSeconds equal to 0

With this fix, Custom Resource instances now also support delete-on-update behavior under the same circumstances.
```
2017-06-28 12:55:24 -07:00
..
api Autogenerated files 2017-06-26 15:02:49 -07:00
apimachinery/tests Fix Unstructured field accessor 2017-06-28 13:44:29 -04:00
apis run hack/update-all 2017-06-22 11:31:03 -07:00
auth Only do string trim when it's necessary 2017-06-15 17:32:31 +08:00
bootstrap/api run hack/update-all 2017-06-22 11:31:03 -07:00
capabilities Fix comment for method SetForTests 2017-02-14 17:16:49 +08:00
client run hack/update-all 2017-06-22 11:31:03 -07:00
cloudprovider Merge pull request #48003 from MrHohn/gce-xlb-cleanup 2017-06-27 14:08:21 -07:00
controller Merge pull request #46761 from yastij/syncService-remove-copy 2017-06-27 15:02:00 -07:00
conversion
credentialprovider run hack/update-all 2017-06-22 11:31:03 -07:00
features Add priority to Kubernetes API 2017-06-26 13:43:19 -07:00
fieldpath run hack/update-all 2017-06-22 11:31:03 -07:00
fields
generated run hack/update-all 2017-06-22 11:31:03 -07:00
hyperkube
kubeapiserver Merge pull request #47038 from yastij/DefaultExternalHost-for-registredCP 2017-06-27 08:29:25 -07:00
kubectl Merge pull request #45611 from atombender/issue-45608 2017-06-28 12:55:21 -07:00
kubelet Merge pull request #48123 from msau42/fix-allocatable-race 2017-06-28 02:00:07 -07:00
kubemark Merge pull request #47783 from NickrenREN/containerruntime 2017-06-23 08:29:28 -07:00
labels
master run hack/update-all 2017-06-22 11:31:03 -07:00
metrics autogenerated 2017-04-14 10:40:57 -07:00
printers Move DaemonSet to table printer 2017-06-26 20:58:02 -04:00
probe Extend Iptables interface with SaveInto 2017-05-19 20:44:25 +02:00
proxy Move iptables logging in kubeproxy from Errorf to V(2).Infof 2017-06-26 19:59:23 +02:00
quota run hack/update-all 2017-06-22 11:31:03 -07:00
registry run hack/update-all 2017-06-22 11:31:03 -07:00
routes Merge pull request #45490 from deads2k/owners-01-extensions 2017-05-10 12:51:51 -07:00
runtime
security run hack/update-all 2017-06-22 11:31:03 -07:00
securitycontext run hack/update-all 2017-06-22 11:31:03 -07:00
serviceaccount run hack/update-all 2017-06-22 11:31:03 -07:00
ssh autogenerated 2017-04-14 10:40:57 -07:00
types
util Merge pull request #47242 from k82cn/make_golint_happy 2017-06-26 20:02:40 -07:00
version Convert go_binary linkstamp to x_defs 2017-06-08 14:59:55 -07:00
volume Merge pull request #47647 from humblec/glusterfs-unused-var 2017-06-26 11:41:01 -07:00
watch autogenerated 2017-04-14 10:40:57 -07:00
BUILD run hack/update-all 2017-06-22 11:31:03 -07:00
OWNERS