mirror of https://github.com/k3s-io/k3s
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 ``` |
||
---|---|---|
.. | ||
clicheck | ||
cloud-controller-manager | ||
gendocs | ||
genkubedocs | ||
genman | ||
genslateyaml | ||
genswaggertypedocs | ||
genutils | ||
genyaml | ||
gke-certificates-controller | ||
hyperkube | ||
kube-apiserver | ||
kube-controller-manager | ||
kube-proxy | ||
kubeadm | ||
kubectl | ||
kubelet | ||
kubemark | ||
libs/go2idl | ||
linkcheck | ||
mungedocs | ||
BUILD | ||
OWNERS |