Files
kubernetes/pkg/api
Kubernetes Submit Queue 1ad792f01d Merge pull request #53464 from juanvallejo/jvallejo/output-empty-creation-ts-as-null
Automatic merge from submit-queue (batch tested with PRs 55050, 53464, 54936, 55028, 54928). 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>.

output empty creationTimestamp as null

**Release note**
```release-note
NONE
```

Updates the value of the `creationTimestamp` field to be `null`
when empty, to keep parity between it and `deletionTimestamp`.

Adds a round-trip test to ensure that unstructured objects containing
empty metadata fields are able to be re-converted back into internal
or external objects. Prior to the proposed patch in this PR, an
unstructured object whose `.metadata.creationTimestamp` value had
been set through the metadata accessor to an empty value 
(`metav1.Time{}` in this case), was unable to be re-converted to an
internal or external type using the runtime decoder. Conversion would
fail with the error:

```
unstructured_test.go:177: FromUnstructured failed: parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
```

cc @liggitt @fabianofranz
2017-11-03 12:59:12 -07:00
..
2017-10-15 18:18:13 -07:00
2017-10-15 18:18:13 -07:00
2017-10-25 16:05:48 -04:00
2017-10-15 18:18:13 -07:00
2017-11-03 21:15:58 +05:30
2017-10-18 17:24:04 +02:00
2017-10-15 18:18:13 -07:00
2017-10-18 17:24:04 +02:00
2017-10-15 18:18:13 -07:00
2017-10-15 18:18:13 -07:00
2017-10-26 13:37:37 -07:00
2017-10-15 18:18:13 -07:00
2017-10-18 17:24:04 +02:00
2016-07-16 13:48:21 -04:00
2017-10-18 10:54:28 -07:00
2017-04-13 10:02:43 -07:00
2017-11-02 11:48:40 +08:00