kubernetes/pkg/kubectl
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
..
cmd Merge pull request #38406 from liggitt/remove-internal-json-annotations 2016-12-10 14:00:17 -08:00
metricsutil Fix package aliases to follow golang convention 2016-11-30 15:40:50 +08:00
resource Compute apply patch using versioned object 2016-12-09 16:26:04 -05:00
testing Update bazel 2016-12-09 16:26:06 -05:00
apply.go Compute apply patch using versioned object 2016-12-09 16:26:04 -05:00
autoscale.go check the value of min and max 2016-12-01 16:09:05 +08:00
bash_comp_utils.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
BUILD refactor: generated 2016-12-03 19:10:46 -05:00
cluster_test.go [Federation][(Un)join-00] Implement federation/cluster resource generator. 2016-11-01 00:58:54 -07:00
cluster.go [Federation][(Un)join-00] Implement federation/cluster resource generator. 2016-11-01 00:58:54 -07:00
clusterrolebinding.go add serviceaccount option to clusterrrolebinding 2016-12-08 14:18:39 -05:00
configmap_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
configmap.go Move IsSecretKey into util/validation 2016-07-03 02:19:09 -07:00
custom_column_printer_test.go refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
custom_column_printer.go make kubectl get generic with respect to objects 2016-11-04 09:04:57 -04:00
deployment_test.go refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
deployment.go refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
describe_test.go refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
describe.go Merge pull request #38265 from brendandburns/configmap 2016-12-09 08:50:23 -08:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
explain.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
generate_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
generate.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
history.go GetOptions in client calls 2016-12-09 09:42:01 +01:00
interfaces.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
kubectl_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
kubectl.go kubectl: set alias for poddisruptionbudget 2016-12-02 18:39:55 +01:00
namespace_test.go Fix namespace_test error message 2016-08-08 12:08:57 +10:00
namespace.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
OWNERS Move pkg/kubectl reviewers into an alias 2016-10-28 14:54:17 -07:00
pdb.go refactor: generated 2016-12-03 19:10:46 -05:00
proxy_server_test.go Make "attach" and "exec" rejection in proxy more explicit 2016-07-19 20:50:19 +02:00
proxy_server.go Code optimization 2016-11-30 17:40:57 +08:00
quota_test.go Add --scopes to kubectl-create-quota and add tests 2016-07-26 14:12:35 +02:00
quota.go Add --scopes to kubectl-create-quota and add tests 2016-07-26 14:12:35 +02:00
resource_filter.go kubectl resource filter convert unstructured obj before apply filter func 2016-11-19 13:03:39 +08:00
resource_printer_test.go Fix tests using internal types for generic printing 2016-12-09 16:26:05 -05:00
resource_printer.go Merge pull request #37943 from ailusazh/ailusa 2016-12-08 00:23:15 -08:00
rollback.go generated: refactor 2016-11-23 22:30:47 -06:00
rolling_updater_test.go refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
rolling_updater.go GetOptions in client calls 2016-12-09 09:42:01 +01:00
rollout_status_test.go kubectl: add --revision flag in rollout status 2016-10-10 15:04:46 +02:00
rollout_status.go GetOptions in client calls 2016-12-09 09:42:01 +01:00
run_test.go refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
run.go refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
scale_test.go GetOptions in client calls 2016-12-09 09:42:01 +01:00
scale.go GetOptions in client calls 2016-12-09 09:42:01 +01:00
secret_for_docker_registry_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
secret_for_docker_registry.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
secret_for_tls_test.go the created path should be closed in test case 2016-09-06 11:08:52 +08:00
secret_for_tls.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
secret_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
secret.go Move IsSecretKey into util/validation 2016-07-03 02:19:09 -07:00
service_basic_test.go Add "create service" sub-commands 2016-08-08 12:31:21 +10:00
service_basic.go create service add create ExternalName service implementation 2016-11-16 04:47:10 -05:00
service_test.go Allow no ports when exposing headless service 2016-09-15 14:56:49 -04:00
service.go Allow no ports when exposing headless service 2016-09-15 14:56:49 -04:00
serviceaccount_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
serviceaccount.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
sorted_resource_name_list_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
sorted_resource_name_list.go kubectl 2016-11-23 15:53:09 -08:00
sorting_printer_test.go refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
sorting_printer.go Make sorting work on versioned objects 2016-12-09 16:26:06 -05:00
stop_test.go GetOptions in client calls 2016-12-09 09:42:01 +01:00
stop.go GetOptions in client calls 2016-12-09 09:42:01 +01:00
versioned_client.go kubectl 2016-11-23 15:53:09 -08:00