diff --git a/hack/update-generated-pod-resources-dockerized.sh b/hack/update-generated-pod-resources-dockerized.sh index 98955cc382b..a477e6e3b8d 100755 --- a/hack/update-generated-pod-resources-dockerized.sh +++ b/hack/update-generated-pod-resources-dockerized.sh @@ -23,7 +23,15 @@ set -o nounset set -o pipefail KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../" && pwd -P)" -POD_RESOURCES="${KUBE_ROOT}/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/" + +dirs=( + "staging/src/k8s.io/kubelet/pkg/apis/podresources/v1alpha1/" + "staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/" +) source "${KUBE_ROOT}/hack/lib/protoc.sh" -kube::protoc::generate_proto "${POD_RESOURCES}" + +for d in "${dirs[@]}"; do + kube::protoc::generate_proto "${KUBE_ROOT}/${d}" +done + diff --git a/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1alpha1/api.pb.go b/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1alpha1/api.pb.go index e4ebb483977..9a9c34fbfc9 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1alpha1/api.pb.go +++ b/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1alpha1/api.pb.go @@ -822,10 +822,7 @@ func (m *ListPodResourcesRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthApi } if (iNdEx + skippy) > l { @@ -909,10 +906,7 @@ func (m *ListPodResourcesResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthApi } if (iNdEx + skippy) > l { @@ -1060,10 +1054,7 @@ func (m *PodResources) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthApi } if (iNdEx + skippy) > l { @@ -1179,10 +1170,7 @@ func (m *ContainerResources) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthApi } if (iNdEx + skippy) > l { @@ -1296,10 +1284,7 @@ func (m *ContainerDevices) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthApi } if (iNdEx + skippy) > l {