k3s/pkg/storage
Kubernetes Submit Queue e732ee70f4 Merge pull request #38406 from liggitt/remove-internal-json-annotations
Automatic merge from submit-queue

Remove json serialization annotations from internal types

fixes #3933

Internal types should never be serialized, and including json serialization tags on them makes it possible to accidentally do that without realizing it.

fixes in this PR:

* types
  * [x] remove json tags from internal types
  * [x] fix references from serialized types to internal ObjectMeta
* generation
  * [x] remove generated json codecs for internal types (they should never be used)
* kubectl
  * [x] fix `apply` to operate on versioned object
  * [x] fix sorting by field to operate on versioned object
  * [x] fix `--record` to build annotation patch using versioned object
* hpa
  * [x] fix unmarshaling to internal CustomMetricTargetList in validation
* thirdpartyresources
  * [x] fix encoding API responses using internal ObjectMeta
* tests
  * [x] fix tests to use versioned objects when checking encoded content
  * [x] fix tests passing internal objects to generic printers

follow ups (will open tracking issues or additional PRs):
- [ ] remove json tags from internal kubeconfig types (`kubectl config set` pathfinding needs to work against external type)
- [ ] HPA should version CustomMetricTargetList serialization in annotations
- [ ] revisit how TPR resthandlers encoding objects
- [ ] audit and add tests for printer use (human-readable printer requires internal versions, generic printers require external versions)
- [ ] add static analysis tests preventing new internal types from adding tags
- [ ] add static analysis tests requiring json tags on external types (and enforcing lower-case first letter)
- [ ] add more tests for `kubectl get` exercising known and unknown types with all output options
2016-12-10 14:00:17 -08:00
..
etcd Update bazel 2016-12-09 16:26:06 -05:00
etcd3 etcd3: have prefix to always prepended 2016-12-04 21:45:07 -08:00
storagebackend autogenerated 2016-10-21 17:32:32 -07:00
testing Update bazel 2016-12-09 16:26:06 -05:00
BUILD Proper fix for non-receiving watchers 2016-12-09 09:43:10 +01:00
OWNERS
cacher.go Proper fix for non-receiving watchers 2016-12-09 09:43:10 +01:00
cacher_test.go refactor: generated 2016-12-03 19:10:46 -05:00
doc.go
errors.go
interfaces.go pkg/storage: docs on watch 0 behavior 2016-12-05 15:10:24 -08:00
selection_predicate.go Cache fields for filtering in watchCache. 2016-11-29 09:48:09 +01:00
selection_predicate_test.go generated: refactor 2016-11-23 22:30:47 -06:00
time_budget.go Proper fix for non-receiving watchers 2016-12-09 09:43:10 +01:00
time_budget_test.go Proper fix for non-receiving watchers 2016-12-09 09:43:10 +01:00
util.go pass SelectionPredicate instead of Filter to storage layer 2016-09-26 09:47:19 -07:00
util_test.go Log water mark for incoming queue in cacher 2016-09-09 11:35:05 +02:00
watch_cache.go Cache fields for filtering in watchCache. 2016-11-29 09:48:09 +01:00
watch_cache_test.go refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00