Commit 34b27ab
[release-0.9] Always set apiVersion and kind for resources within a resource list (#301)
* Always set apiVersion and kind for resources within a resource list
When the Kubernetes REST API returns a list of objects, it returns a
resource list object with an apiVersion and kind set to "KindList" where
"Kind" is the Kind of object queried, rather than an simple array of
objects.
The `items` property contains the array of resources returned. Each
resource in this list does not contain the GVK information, only the
resource list has an apiVersion or kind property set.
This ensures when a resource list is returned, each resource within the
list has it's apiVersion and kind set, to make it similar to other
Kubernetes clients, and easier to work with the returned resources.
* Just do one big serialization at the end of a ResourceList operation1 parent 437342a commit 34b27ab
1 file changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | | - | |
| 476 | + | |
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
488 | | - | |
| 488 | + | |
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | | - | |
| 497 | + | |
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
| |||
979 | 979 | | |
980 | 980 | | |
981 | 981 | | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
982 | 993 | | |
983 | 994 | | |
984 | 995 | | |
| |||
0 commit comments