Files
kubernetes/hack
Kubernetes Submit Queue c2667203e4 Merge pull request #45859 from DirectXMan12/refactor/protobuf-for-metrics
Automatic merge from submit-queue

Protobuf generation for k8s.io/metrics

This PR introduces protobuf generation for k8s.io/metrics.  Doing so required:

- fixing a bug in `go-to-protobuf` causing the `cast{key,value,type}` values to not be quoted when coming from struct tags (and not auto-injection by `go-to-protobuf` itself).
- Making sure the proto IDL in k8s.io/client-go had a package name of `k8s.io.client_go.xyz` and not `k8s.io.kubernetes.xyz`.

Additionally, I updated `go-to-protobuf` to skip functions and non-public types when composing the import list, which cuts down on the more bizarre imports in the IDL (like importing the sample API package in every IDL file because it contained `addToScheme`, like every other API package).

We use `castvalue` to force gogo-proto to realize that it should consider the value of the map which underlies `ResourceList` when calculating which imports need to be named.  Otherwise, it ignores the value's type, leading to compilation errors when it later can't find an import it assumed existed.  We accidentally didn't hit this in `k8s.io/kubernetes/pkg/api/v1` since another field coincidentally happens to directly use `resource.Quantity` (the value type of `ResourceList`).

**Release note**:
```release-note
NONE
```
2017-05-27 14:08:46 -07:00
..
2017-03-25 12:16:50 -07:00
2017-05-26 00:03:53 -07:00
2017-05-26 00:14:11 -07:00
2017-02-10 17:00:28 -08:00
2016-07-12 21:52:54 -07:00
2016-07-12 21:52:00 -07:00
2017-02-01 15:18:32 -05:00
2017-04-28 18:51:34 +00:00
2017-05-02 08:43:31 -04:00
2016-08-02 10:27:29 -04:00
2016-07-12 21:52:00 -07:00
2017-04-27 15:01:34 -07:00
2017-05-02 08:43:31 -04:00
2016-07-12 21:52:00 -07:00
2017-05-19 10:17:37 -06:00
2017-04-27 15:01:34 -07:00
2016-12-06 13:45:10 -05:00
2017-05-18 10:39:04 -07:00
2017-05-19 10:17:37 -06:00
2016-12-14 06:03:00 -08:00