c2667203e4
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 ``` |
||
---|---|---|
.. | ||
src/k8s.io | ||
OWNERS | ||
README.md | ||
copy.sh | ||
godeps-json-updater.go | ||
prime-apimachinery.sh |
README.md
This directory is the staging area for packages that have been split to their own repository. The content here will be periodically published to respective top-level k8s.io repositories.
Most code in the staging/
directory is authoritative, i.e. the only copy of
the code. You can directly modify such code. However the packages in
staging/src/k8s.io/client-go/pkg
are copied from pkg/
. If you modify the
original code in pkg/
, you need to run hack/godep-restore.sh
from the k8s
root directory, followed by hack/update-staging-client-go.sh
. We are working
towards making all code in staging/
authoritative.
The vendor/k8s.io
directory contains symlinks pointing to this staging area,
so to use a package in the staging area, you can import it as
k8s.io/<package-name>
, as if the package were vendored. Packages will be
vendored from k8s.io/<package-name>
for real after the test matrix is
converted to vendor k8s components.