diff --git a/hack/lib/protoc.sh b/hack/lib/protoc.sh index 7d4174a4565..1b02310f544 100644 --- a/hack/lib/protoc.sh +++ b/hack/lib/protoc.sh @@ -56,10 +56,19 @@ function kube::protoc::protoc() { local package=${1} gogopath=$(dirname "$(kube::util::find-binary "protoc-gen-gogo")") - PATH="${gogopath}:${PATH}" protoc \ - --proto_path="${package}" \ - --proto_path="${KUBE_ROOT}/vendor" \ - --gogo_out=plugins=grpc:"${package}" "${package}/api.proto" + ( + cd "${package}" + + # This invocation of --gogo_out produces its output in the current + # directory (despite gogo docs saying it would be source-relative, it + # isn't). The inputs to this function do not all have a common root, so + # this works best for all inputs. + PATH="${gogopath}:${PATH}" protoc \ + --proto_path="$(pwd -P)" \ + --proto_path="${KUBE_ROOT}/vendor" \ + --gogo_out=paths=source_relative,plugins=grpc:. \ + api.proto + ) } # Formats $1/api.pb.go, adds the boilerplate comments and run gofmt on it @@ -72,7 +81,7 @@ function kube::protoc::format() { # Run gofmt to clean up the generated code. kube::golang::verify_go_version - gofmt -l -s -w "${package}/api.pb.go" + gofmt -s -w "${package}/api.pb.go" } # Compares the contents of $1 and $2 diff --git a/hack/make-rules/update.sh b/hack/make-rules/update.sh index a1ea51ce530..abeb7b19c0e 100755 --- a/hack/make-rules/update.sh +++ b/hack/make-rules/update.sh @@ -38,9 +38,6 @@ fi BASH_TARGETS=( update-generated-protobuf update-codegen - update-generated-runtime - update-generated-device-plugin - update-generated-dynamic-resource-allocation update-generated-api-compatibility-data update-generated-docs update-generated-swagger-docs diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 69d620255f2..37344693bdd 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -777,6 +777,43 @@ function codegen::subprojects() { done } +function codegen::protobindings() { + # Each element of this array is a directory containing subdirectories which + # eventually contain a file named "api.proto". + local apis=( + "staging/src/k8s.io/cri-api/pkg/apis/runtime" + + "staging/src/k8s.io/kubelet/pkg/apis/podresources" + + "staging/src/k8s.io/kubelet/pkg/apis/deviceplugin" + + "staging/src/k8s.io/kms/apis" + "staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2" + + "staging/src/k8s.io/kubelet/pkg/apis/dra" + + "staging/src/k8s.io/kubelet/pkg/apis/pluginregistration" + "pkg/kubelet/pluginmanager/pluginwatcher/example_plugin_apis" + ) + + kube::log::status "Generating protobuf bindings for ${#apis[@]} targets" + if [[ "${DBG_CODEGEN}" == 1 ]]; then + kube::log::status "DBG: generating protobuf bindings for:" + for dir in "${apis[@]}"; do + kube::log::status "DBG: $dir" + done + fi + + for api in "${apis[@]}"; do + git ls-files -z -cmo --exclude-standard ":(glob)${api}"/'**/api.pb.go' \ + | xargs -0 rm -f + done + + # NOTE: All output from this script needs to be copied back to the calling + # source tree. This is managed in kube::build::copy_output in build/common.sh. + # If the output set is changed update that function. + build/run.sh hack/update-generated-proto-bindings-dockerized.sh "${apis[@]}" +} # # main diff --git a/hack/update-generated-device-plugin.sh b/hack/update-generated-device-plugin.sh deleted file mode 100755 index 6652500887f..00000000000 --- a/hack/update-generated-device-plugin.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2017 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -o errexit -set -o nounset -set -o pipefail - -KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. - -# NOTE: All output from this script needs to be copied back to the calling -# source tree. This is managed in kube::build::copy_output in build/common.sh. -# If the output set is changed update that function. - -"${KUBE_ROOT}/build/run.sh" hack/update-generated-device-plugin-dockerized.sh "$@" diff --git a/hack/update-generated-dynamic-resource-allocation-dockerized.sh b/hack/update-generated-dynamic-resource-allocation-dockerized.sh deleted file mode 100755 index ad9f75f114d..00000000000 --- a/hack/update-generated-dynamic-resource-allocation-dockerized.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2017 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script generates `*/api.pb.go` from the protobuf file `*/api.proto`. -# Example: -# kube::protoc::generate_proto "${DYNAMIC_RESOURCE_ALLOCATION_ALPHA}" - -set -o errexit -set -o nounset -set -o pipefail - -KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../" && pwd -P)" -DYNAMIC_RESOURCE_ALLOCATION_V1ALPHA1="${KUBE_ROOT}/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha1/" - -source "${KUBE_ROOT}/hack/lib/protoc.sh" -kube::protoc::generate_proto "${DYNAMIC_RESOURCE_ALLOCATION_V1ALPHA1}" diff --git a/hack/update-generated-dynamic-resource-allocation.sh b/hack/update-generated-dynamic-resource-allocation.sh deleted file mode 100755 index d20db5edb5e..00000000000 --- a/hack/update-generated-dynamic-resource-allocation.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2017 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -o errexit -set -o nounset -set -o pipefail - -KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. - -# NOTE: All output from this script needs to be copied back to the calling -# source tree. This is managed in kube::build::copy_output in build/common.sh. -# If the output set is changed update that function. - -"${KUBE_ROOT}/build/run.sh" hack/update-generated-dynamic-resource-allocation-dockerized.sh "$@" diff --git a/hack/update-generated-kms-dockerized.sh b/hack/update-generated-kms-dockerized.sh deleted file mode 100755 index 15d794ea7bd..00000000000 --- a/hack/update-generated-kms-dockerized.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -o errexit -set -o nounset -set -o pipefail - -KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -KUBE_KMS_V1BETA1="${KUBE_ROOT}/staging/src/k8s.io/kms/apis/v1beta1/" -KUBE_KMS_V2ALPHA1="${KUBE_ROOT}/staging/src/k8s.io/kms/apis/v2alpha1/" -KUBE_KMS_V2="${KUBE_ROOT}/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/v2alpha1/" - -source "${KUBE_ROOT}/hack/lib/protoc.sh" -kube::protoc::generate_proto "${KUBE_KMS_V1BETA1}" -kube::protoc::generate_proto "${KUBE_KMS_V2ALPHA1}" -kube::protoc::generate_proto "${KUBE_KMS_V2}" diff --git a/hack/update-generated-kms.sh b/hack/update-generated-kms.sh deleted file mode 100755 index 6ae29450d0c..00000000000 --- a/hack/update-generated-kms.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -o errexit -set -o nounset -set -o pipefail - -KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. - -# NOTE: All output from this script needs to be copied back to the calling -# source tree. This is managed in kube::build::copy_output in build/common.sh. -# If the output set is changed update that function. - -"${KUBE_ROOT}/build/run.sh" hack/update-generated-kms-dockerized.sh "$@" - -# ex: ts=2 sw=2 et filetype=sh diff --git a/hack/update-generated-kubelet-plugin-registration-dockerized.sh b/hack/update-generated-kubelet-plugin-registration-dockerized.sh deleted file mode 100755 index e3ead0696a1..00000000000 --- a/hack/update-generated-kubelet-plugin-registration-dockerized.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script generates `*/api.pb.go` from the protobuf file `*/api.proto`. -# Example: -# kube::protoc::generate_proto "${KUBELET_PLUGIN_REGISTRATION_V1ALPHA}" - -set -o errexit -set -o nounset -set -o pipefail - -KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../" && pwd -P)" - -dirs=( - "staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1alpha1/" - "staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1beta1/" - "staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1/" - "pkg/kubelet/pluginmanager/pluginwatcher/example_plugin_apis/v1beta1/" - "pkg/kubelet/pluginmanager/pluginwatcher/example_plugin_apis/v1beta2/" -) - -source "${KUBE_ROOT}/hack/lib/protoc.sh" - -for d in "${dirs[@]}"; do - kube::protoc::generate_proto "${KUBE_ROOT}/${d}" -done diff --git a/hack/update-generated-kubelet-plugin-registration.sh b/hack/update-generated-kubelet-plugin-registration.sh deleted file mode 100755 index 46e3d1f8c83..00000000000 --- a/hack/update-generated-kubelet-plugin-registration.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -o errexit -set -o nounset -set -o pipefail - -KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. - -# NOTE: All output from this script needs to be copied back to the calling -# source tree. This is managed in kube::build::copy_output in build/common.sh. -# If the output set is changed update that function. - -"${KUBE_ROOT}/build/run.sh" hack/update-generated-kubelet-plugin-registration-dockerized.sh "$@" diff --git a/hack/update-generated-pod-resources-dockerized.sh b/hack/update-generated-pod-resources-dockerized.sh deleted file mode 100755 index a477e6e3b8d..00000000000 --- a/hack/update-generated-pod-resources-dockerized.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script generates `*/api.pb.go` from the protobuf file `*/api.proto`. -# Example: -# kube::protoc::generate_proto "${POD_RESOURCES}" - -set -o errexit -set -o nounset -set -o pipefail - -KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../" && pwd -P)" - -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" - -for d in "${dirs[@]}"; do - kube::protoc::generate_proto "${KUBE_ROOT}/${d}" -done - diff --git a/hack/update-generated-pod-resources.sh b/hack/update-generated-pod-resources.sh deleted file mode 100755 index c51a156064d..00000000000 --- a/hack/update-generated-pod-resources.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script generates `/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.pb.go` -# from the protobuf file `/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.proto` -# for pods. -# Usage: `hack/update-generated-pod-resources.sh`. - -set -o errexit -set -o nounset -set -o pipefail - -KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. - -# NOTE: All output from this script needs to be copied back to the calling -# source tree. This is managed in kube::build::copy_output in build/common.sh. -# If the output set is changed update that function. - -"${KUBE_ROOT}/build/run.sh" hack/update-generated-pod-resources-dockerized.sh "$@" diff --git a/hack/update-generated-device-plugin-dockerized.sh b/hack/update-generated-proto-bindings-dockerized.sh similarity index 53% rename from hack/update-generated-device-plugin-dockerized.sh rename to hack/update-generated-proto-bindings-dockerized.sh index 3f507511d2f..cd5dab862cb 100755 --- a/hack/update-generated-device-plugin-dockerized.sh +++ b/hack/update-generated-proto-bindings-dockerized.sh @@ -14,18 +14,36 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This script generates `*/api.pb.go` from the protobuf file `*/api.proto`. -# Example: -# kube::protoc::generate_proto "${DEVICE_PLUGIN_ALPHA}" +# This script generates `*/api.pb.go` files from protobuf files `*/api.proto`. set -o errexit set -o nounset set -o pipefail KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../" && pwd -P)" -DEVICE_PLUGIN_ALPHA="${KUBE_ROOT}/staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1alpha/" -DEVICE_PLUGIN_V1BETA1="${KUBE_ROOT}/staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/" source "${KUBE_ROOT}/hack/lib/protoc.sh" -kube::protoc::generate_proto "${DEVICE_PLUGIN_ALPHA}" -kube::protoc::generate_proto "${DEVICE_PLUGIN_V1BETA1}" +source "${KUBE_ROOT}/hack/lib/util.sh" + +if [ "$#" == 0 ]; then + echo "usage: $0 ..." + exit 1 +fi + +for api; do + # This can't use `git ls-files` because it runs in a container without the + # .git dir synced. + protos=() + kube::util::read-array protos < <( \ + find "${api}" -type f -name "api.proto") + + if [ "${#protos[@]}" == 0 ]; then + echo "ERROR: no 'api.proto' files under '${api}'" + exit 1 + fi + + for file in "${protos[@]}"; do + dir="$(dirname "${file}")" + kube::protoc::generate_proto "${dir}" + done +done diff --git a/hack/update-generated-runtime-dockerized.sh b/hack/update-generated-runtime-dockerized.sh deleted file mode 100755 index e51be3e058e..00000000000 --- a/hack/update-generated-runtime-dockerized.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2016 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script builds protoc-gen-gogo binary in runtime and genertates -# `*/api.pb.go` from the protobuf file `*/api.proto`. - -set -o errexit -set -o nounset -set -o pipefail - -KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -KUBE_REMOTE_RUNTIME_ROOT="${KUBE_ROOT}/staging/src/k8s.io/cri-api/pkg/apis/runtime/" -source "${KUBE_ROOT}/hack/lib/init.sh" - -runtime_versions=("v1") - -kube::golang::setup_env - -GO111MODULE=on GOPROXY=off go install k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo - -if [[ -z "$(which protoc)" || "$(protoc --version)" != "libprotoc 3."* ]]; then - echo "Generating protobuf requires protoc 3.0.0-beta1 or newer. Please download and" - echo "install the platform appropriate Protobuf package for your OS: " - echo - echo " https://github.com/protocolbuffers/protobuf/releases" - echo - echo "WARNING: Protobuf changes are not being validated" - exit 1 -fi - -function cleanup { - for v in "${runtime_versions[@]}"; do - rm -f "${KUBE_REMOTE_RUNTIME_ROOT}/${v}/api.pb.go.bak" - rm -f "${KUBE_REMOTE_RUNTIME_ROOT}/${v}/api.pb.go.tmp" - done -} - -trap cleanup EXIT - -gogopath=$(dirname "$(kube::util::find-binary "protoc-gen-gogo")") -PATH="${gogopath}:${PATH}" - -function generate_code() { - RUNTIME_API_VERSION="$1" - KUBE_REMOTE_RUNTIME_PATH="${KUBE_REMOTE_RUNTIME_ROOT}/${RUNTIME_API_VERSION}" - protoc \ - --proto_path="${KUBE_REMOTE_RUNTIME_PATH}" \ - --proto_path="${KUBE_ROOT}/vendor" \ - --gogo_out=plugins=grpc:"${KUBE_ROOT}/staging/src" "${KUBE_REMOTE_RUNTIME_PATH}/api.proto" - - # Update boilerplate for the generated file. - cat hack/boilerplate/boilerplate.generatego.txt "${KUBE_REMOTE_RUNTIME_PATH}/api.pb.go" > "${KUBE_REMOTE_RUNTIME_PATH}/api.pb.go.tmp" - mv "${KUBE_REMOTE_RUNTIME_PATH}/api.pb.go.tmp" "${KUBE_REMOTE_RUNTIME_PATH}/api.pb.go" - - # Run gofmt to clean up the generated code. - kube::golang::verify_go_version - gofmt -l -s -w "${KUBE_REMOTE_RUNTIME_PATH}/api.pb.go" -} - -for v in "${runtime_versions[@]}"; do - generate_code "${v}" -done diff --git a/hack/update-generated-runtime.sh b/hack/update-generated-runtime.sh deleted file mode 100755 index a2656daea98..00000000000 --- a/hack/update-generated-runtime.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2016 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script builds protoc-gen-gogo binary in runtime and genertates -# `*/api.pb.go` from the protobuf file `*/api.proto`. -# Usage: -# hack/update-generated-runtime.sh - -set -o errexit -set -o nounset -set -o pipefail - -KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. - -# NOTE: All output from this script needs to be copied back to the calling -# source tree. This is managed in kube::build::copy_output in build/common.sh. -# If the output set is changed update that function. - -"${KUBE_ROOT}/build/run.sh" hack/update-generated-runtime-dockerized.sh "$@" - -# ex: ts=2 sw=2 et filetype=sh diff --git a/hack/verify-generated-device-plugin.sh b/hack/verify-generated-device-plugin.sh deleted file mode 100755 index 88118821761..00000000000 --- a/hack/verify-generated-device-plugin.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2017 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script checks whether updating of device plugin API is needed or not. We -# should run `hack/update-generated-device-plugin.sh` if device plugin API is -# out of date. -# Usage: `hack/verify-generated-device-plugin.sh`. - -set -o errexit -set -o nounset -set -o pipefail - -KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -ERROR="Device plugin api is out of date. Please run hack/update-generated-device-plugin.sh" -DEVICE_PLUGIN_ALPHA="${KUBE_ROOT}/staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1alpha/" -DEVICE_PLUGIN_V1BETA1="${KUBE_ROOT}/staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/" - -source "${KUBE_ROOT}/hack/lib/protoc.sh" -kube::golang::setup_env - -function cleanup { - rm -rf "${DEVICE_PLUGIN_ALPHA}/_tmp/" - rm -rf "${DEVICE_PLUGIN_V1BETA1}/_tmp/" -} - -trap cleanup EXIT - -mkdir -p "${DEVICE_PLUGIN_ALPHA}/_tmp" -cp "${DEVICE_PLUGIN_ALPHA}/api.pb.go" "${DEVICE_PLUGIN_ALPHA}/_tmp/" -mkdir -p "${DEVICE_PLUGIN_V1BETA1}/_tmp" -cp "${DEVICE_PLUGIN_V1BETA1}/api.pb.go" "${DEVICE_PLUGIN_V1BETA1}/_tmp/" - -KUBE_VERBOSE=3 "${KUBE_ROOT}/hack/update-generated-device-plugin.sh" -kube::protoc::diff "${DEVICE_PLUGIN_ALPHA}/api.pb.go" "${DEVICE_PLUGIN_ALPHA}/_tmp/api.pb.go" "${ERROR}" -echo "Generated device plugin alpha api is up to date." -kube::protoc::diff "${DEVICE_PLUGIN_V1BETA1}/api.pb.go" "${DEVICE_PLUGIN_V1BETA1}/_tmp/api.pb.go" "${ERROR}" -echo "Generated device plugin beta api is up to date." diff --git a/hack/verify-generated-dynamic-resource-allocation.sh b/hack/verify-generated-dynamic-resource-allocation.sh deleted file mode 100755 index 3f38cbf5671..00000000000 --- a/hack/verify-generated-dynamic-resource-allocation.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2022 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script checks whether updating of device plugin API is needed or not. We -# should run `hack/update-generated-dynamic-resource-allocation.sh` if device plugin API is -# out of date. -# Usage: `hack/verify-generated-dynamic-resource-allocation.sh`. - -set -o errexit -set -o nounset -set -o pipefail - -KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -ERROR="Dynamic resource allocation kubelet plugin api is out of date. Please run hack/update-generated-dynamic-resource-allocation.sh" -DYNAMIC_RESOURCE_ALLOCATION_V1ALPHA1="${KUBE_ROOT}/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha1/" - -source "${KUBE_ROOT}/hack/lib/protoc.sh" -kube::golang::setup_env - -function cleanup { - rm -rf "${DYNAMIC_RESOURCE_ALLOCATION_V1ALPHA1}/_tmp/" -} - -trap cleanup EXIT - -mkdir -p "${DYNAMIC_RESOURCE_ALLOCATION_V1ALPHA1}/_tmp" -cp "${DYNAMIC_RESOURCE_ALLOCATION_V1ALPHA1}/api.pb.go" "${DYNAMIC_RESOURCE_ALLOCATION_V1ALPHA1}/_tmp/" - -KUBE_VERBOSE=3 "${KUBE_ROOT}/hack/update-generated-dynamic-resource-allocation.sh" -kube::protoc::diff "${DYNAMIC_RESOURCE_ALLOCATION_V1ALPHA1}/api.pb.go" "${DYNAMIC_RESOURCE_ALLOCATION_V1ALPHA1}/_tmp/api.pb.go" "${ERROR}" -echo "Generated dynamic resource allocation kubelet plugin alpha api is up to date." diff --git a/hack/verify-generated-kms.sh b/hack/verify-generated-kms.sh deleted file mode 100755 index 632e4dd6cde..00000000000 --- a/hack/verify-generated-kms.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script checks whether updating of KMS gRPC is needed or not. We should -# run `hack/update-generated-kms.sh` if KMS gRPC is out of date. -# Usage: `hack/verify-generated-kms.sh`. - -set -o errexit -set -o nounset -set -o pipefail - -KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -ERROR="KMS gRPC is out of date. Please run hack/update-generated-kms.sh" -KUBE_KMS_V1BETA1="${KUBE_ROOT}/staging/src/k8s.io/kms/apis/v1beta1/" -KUBE_KMS_V2ALPHA1="${KUBE_ROOT}/staging/src/k8s.io/kms/apis/v2alpha1/" -KUBE_KMS_V2="${KUBE_ROOT}/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/v2alpha1/" - -source "${KUBE_ROOT}/hack/lib/protoc.sh" -kube::golang::setup_env - -function cleanup { - rm -rf "${KUBE_KMS_V1BETA1}/_tmp/" - rm -rf "${KUBE_KMS_V2ALPHA1}/_tmp/" - rm -rf "${KUBE_KMS_V2}/_tmp/" -} - -trap cleanup EXIT - -mkdir -p "${KUBE_KMS_V1BETA1}/_tmp" -cp "${KUBE_KMS_V1BETA1}/api.pb.go" "${KUBE_KMS_V1BETA1}/_tmp/" -mkdir -p "${KUBE_KMS_V2ALPHA1}/_tmp" -cp "${KUBE_KMS_V2ALPHA1}/api.pb.go" "${KUBE_KMS_V2ALPHA1}/_tmp/" -mkdir -p "${KUBE_KMS_V2}/_tmp" -cp "${KUBE_KMS_V2}/api.pb.go" "${KUBE_KMS_V2}/_tmp/" - -KUBE_VERBOSE=3 "${KUBE_ROOT}/hack/update-generated-kms.sh" -kube::protoc::diff "${KUBE_KMS_V1BETA1}/api.pb.go" "${KUBE_KMS_V1BETA1}/_tmp/api.pb.go" "${ERROR}" -echo "Generated kms v1beta1 api is up to date." -kube::protoc::diff "${KUBE_KMS_V2ALPHA1}/api.pb.go" "${KUBE_KMS_V2ALPHA1}/_tmp/api.pb.go" "${ERROR}" -echo "Generated kms v2alpha1 api is up to date." -kube::protoc::diff "${KUBE_KMS_V2}/api.pb.go" "${KUBE_KMS_V2}/_tmp/api.pb.go" "${ERROR}" -echo "Generated kms v2 api is up to date." diff --git a/hack/verify-generated-kubelet-plugin-registration.sh b/hack/verify-generated-kubelet-plugin-registration.sh deleted file mode 100755 index 07b2f2af7c7..00000000000 --- a/hack/verify-generated-kubelet-plugin-registration.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script checks whether updating of kubelet plugin registration API is -# needed or not. We should run -# `hack/update-generated-kubelet-plugin-registration.sh` if kubelet plugin -# registration API is out of date. -# Usage: `hack/verify-generated-kubelet-plugin-registration.sh`. - -set -o errexit -set -o nounset -set -o pipefail - -KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -ERROR="Kubelet Plugin Registration api is out of date. Please run hack/update-generated-kubelet-plugin-registration.sh" -KUBELET_PLUGIN_REGISTRATION_V1ALPHA="${KUBE_ROOT}/staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1alpha1/" -KUBELET_PLUGIN_REGISTRATION_V1BETA="${KUBE_ROOT}/staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1beta1/" - -source "${KUBE_ROOT}/hack/lib/protoc.sh" -kube::golang::setup_env - -function cleanup { - rm -rf "${KUBELET_PLUGIN_REGISTRATION_V1ALPHA}/_tmp/" - rm -rf "${KUBELET_PLUGIN_REGISTRATION_V1BETA}/_tmp/" -} - -trap cleanup EXIT - -mkdir -p "${KUBELET_PLUGIN_REGISTRATION_V1ALPHA}/_tmp" -mkdir -p "${KUBELET_PLUGIN_REGISTRATION_V1BETA}/_tmp" - -cp "${KUBELET_PLUGIN_REGISTRATION_V1ALPHA}/api.pb.go" "${KUBELET_PLUGIN_REGISTRATION_V1ALPHA}/_tmp/" -cp "${KUBELET_PLUGIN_REGISTRATION_V1BETA}/api.pb.go" "${KUBELET_PLUGIN_REGISTRATION_V1BETA}/_tmp/" - -# Check V1Alpha -KUBE_VERBOSE=3 "${KUBE_ROOT}/hack/update-generated-kubelet-plugin-registration.sh" -kube::protoc::diff "${KUBELET_PLUGIN_REGISTRATION_V1ALPHA}/api.pb.go" "${KUBELET_PLUGIN_REGISTRATION_V1ALPHA}/_tmp/api.pb.go" "${ERROR}" -echo "Generated Kubelet Plugin Registration api is up to date." - -# Check V1Beta -KUBE_VERBOSE=3 "${KUBE_ROOT}/hack/update-generated-kubelet-plugin-registration.sh" -kube::protoc::diff "${KUBELET_PLUGIN_REGISTRATION_V1BETA}/api.pb.go" "${KUBELET_PLUGIN_REGISTRATION_V1BETA}/_tmp/api.pb.go" "${ERROR}" -echo "Generated Kubelet Plugin Registration api is up to date." diff --git a/hack/verify-generated-pod-resources.sh b/hack/verify-generated-pod-resources.sh deleted file mode 100755 index 46e7442964f..00000000000 --- a/hack/verify-generated-pod-resources.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script checks whether updating of Pod resources API is needed or not. We -# should run `hack/update-generated-pod-resources.sh` if Pod resources API is -# out of date. -# Usage: `hack/verify-generated-pod-resources.sh`. - -set -o errexit -set -o nounset -set -o pipefail - -KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -POD_RESOURCES="${KUBE_ROOT}/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/" -source "${KUBE_ROOT}/hack/lib/init.sh" - -kube::golang::setup_env - -function cleanup { - rm -rf "${POD_RESOURCES}/_tmp/" -} - -trap cleanup EXIT - -mkdir -p "${POD_RESOURCES}/_tmp" -cp "${POD_RESOURCES}/api.pb.go" "${POD_RESOURCES}/_tmp/" - -ret=0 -KUBE_VERBOSE=3 "${KUBE_ROOT}/hack/update-generated-pod-resources.sh" -diff -I "gzipped FileDescriptorProto" -I "0x" -Naupr "${POD_RESOURCES}/_tmp/api.pb.go" "${POD_RESOURCES}/api.pb.go" || ret=$? -if [[ $ret -eq 0 ]]; then - echo "Generated pod resources api is up to date." - cp "${POD_RESOURCES}/_tmp/api.pb.go" "${POD_RESOURCES}/" -else - echo "Generated pod resources api is out of date. Please run hack/update-generated-pod-resources.sh" - exit 1 -fi diff --git a/hack/verify-generated-runtime.sh b/hack/verify-generated-runtime.sh deleted file mode 100755 index 8b1345ac404..00000000000 --- a/hack/verify-generated-runtime.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2016 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script checks whether updating of container runtime API is needed or not. -# We should run `hack/update-generated-runtime.sh` if container runtime API is -# out of date. -# Usage: `hack/verify-generated-runtime.sh`. - -set -o errexit -set -o nounset -set -o pipefail - -KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -KUBE_REMOTE_RUNTIME_ROOT="${KUBE_ROOT}/staging/src/k8s.io/cri-api/pkg/apis/runtime/" -source "${KUBE_ROOT}/hack/lib/init.sh" - -runtime_versions=("v1") - -kube::golang::setup_env - -function cleanup { - for v in "${runtime_versions[@]}"; do - rm -rf "${KUBE_REMOTE_RUNTIME_ROOT}/${v}/_tmp/" - done -} - -trap cleanup EXIT - -function verify_generated_code() { - RUNTIME_API_VERSION="$1" - KUBE_REMOTE_RUNTIME_PATH="${KUBE_REMOTE_RUNTIME_ROOT}/${RUNTIME_API_VERSION}" - mkdir -p "${KUBE_REMOTE_RUNTIME_PATH}/_tmp" - cp "${KUBE_REMOTE_RUNTIME_PATH}/api.pb.go" "${KUBE_REMOTE_RUNTIME_PATH}/_tmp/" - - ret=0 - KUBE_VERBOSE=3 "${KUBE_ROOT}/hack/update-generated-runtime.sh" - diff -I "gzipped FileDescriptorProto" -I "0x" -Naupr "${KUBE_REMOTE_RUNTIME_PATH}/_tmp/api.pb.go" "${KUBE_REMOTE_RUNTIME_PATH}/api.pb.go" || ret=$? - if [[ $ret -eq 0 ]]; then - echo "Generated container runtime api is up to date." - cp "${KUBE_REMOTE_RUNTIME_PATH}/_tmp/api.pb.go" "${KUBE_REMOTE_RUNTIME_PATH}/" - else - echo "Generated container runtime api is out of date. Please run hack/update-generated-runtime.sh" - exit 1 - fi -} - -for v in "${runtime_versions[@]}"; do - verify_generated_code "${v}" -done diff --git a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/v2alpha1/api.proto b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/v2alpha1/api.proto index e3b978b05ed..ba61622714c 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/v2alpha1/api.proto +++ b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/v2alpha1/api.proto @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// To regenerate api.pb.go run hack/update-generated-kms.sh +// To regenerate api.pb.go run `hack/update-codegen.sh protobindings` syntax = "proto3"; package v2alpha1; diff --git a/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto b/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto index 83a7ac31215..7df44f2d2ee 100644 --- a/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto +++ b/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// To regenerate api.pb.go run hack/update-generated-runtime.sh +// To regenerate api.pb.go run `hack/update-codegen.sh protobindings` syntax = "proto3"; package runtime.v1; diff --git a/staging/src/k8s.io/kms/apis/v1beta1/api.proto b/staging/src/k8s.io/kms/apis/v1beta1/api.proto index a9b44bf5fa1..ec3f570a57a 100644 --- a/staging/src/k8s.io/kms/apis/v1beta1/api.proto +++ b/staging/src/k8s.io/kms/apis/v1beta1/api.proto @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// To regenerate api.pb.go run hack/update-generated-kms.sh +// To regenerate api.pb.go run `hack/update-codegen.sh protobindings` syntax = "proto3"; package v1beta1; diff --git a/staging/src/k8s.io/kms/apis/v2alpha1/api.proto b/staging/src/k8s.io/kms/apis/v2alpha1/api.proto index 9b960b2acc4..2c3b3fa669c 100644 --- a/staging/src/k8s.io/kms/apis/v2alpha1/api.proto +++ b/staging/src/k8s.io/kms/apis/v2alpha1/api.proto @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// To regenerate api.pb.go run hack/update-generated-kms.sh +// To regenerate api.pb.go run `hack/update-codegen.sh protobindings` syntax = "proto3"; package v2alpha1; diff --git a/staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1alpha/api.proto b/staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1alpha/api.proto index 13ad6e7ff5d..201a4cb7cb8 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1alpha/api.proto +++ b/staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1alpha/api.proto @@ -1,4 +1,4 @@ -// To regenerate api.pb.go run hack/update-generated-device-plugin.sh +// To regenerate api.pb.go run `hack/update-codegen.sh protobindings` syntax = "proto3"; package deviceplugin; diff --git a/staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.proto b/staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.proto index d22da05b2a0..dbf608b810d 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.proto +++ b/staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.proto @@ -1,4 +1,4 @@ -// To regenerate api.pb.go run hack/update-generated-device-plugin.sh +// To regenerate api.pb.go run `hack/update-codegen.sh protobindings` syntax = "proto3"; package v1beta1; diff --git a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha1/api.proto b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha1/api.proto index 2ba5c5c34d4..8278fbc9b98 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha1/api.proto +++ b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha1/api.proto @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// To regenerate api.pb.go run hack/update-generated-kubelet-plugin-registration.sh +// To regenerate api.pb.go run `hack/update-codegen.sh protobindings` syntax = "proto3"; @@ -78,4 +78,4 @@ message NodeUnprepareResourceRequest { message NodeUnprepareResourceResponse { // Intentionally empty. -} \ No newline at end of file +} diff --git a/staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1/api.proto b/staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1/api.proto index 5c4f6f80168..454404c3976 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1/api.proto +++ b/staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1/api.proto @@ -1,4 +1,4 @@ -// To regenerate api.pb.go run hack/update-generated-kubelet-plugin-registration.sh +// To regenerate api.pb.go run `hack/update-codegen.sh protobindings` syntax = "proto3"; package pluginregistration; diff --git a/staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1alpha1/api.proto b/staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1alpha1/api.proto index 5c4f6f80168..454404c3976 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1alpha1/api.proto +++ b/staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1alpha1/api.proto @@ -1,4 +1,4 @@ -// To regenerate api.pb.go run hack/update-generated-kubelet-plugin-registration.sh +// To regenerate api.pb.go run `hack/update-codegen.sh protobindings` syntax = "proto3"; package pluginregistration; diff --git a/staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1beta1/api.proto b/staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1beta1/api.proto index 5c4f6f80168..454404c3976 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1beta1/api.proto +++ b/staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1beta1/api.proto @@ -1,4 +1,4 @@ -// To regenerate api.pb.go run hack/update-generated-kubelet-plugin-registration.sh +// To regenerate api.pb.go run `hack/update-codegen.sh protobindings` syntax = "proto3"; package pluginregistration; diff --git a/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.proto b/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.proto index add2aad4874..1157a162933 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.proto +++ b/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.proto @@ -1,4 +1,4 @@ -// To regenerate api.pb.go run hack/update-generated-pod-resources.sh +// To regenerate api.pb.go run `hack/update-codegen.sh protobindings` syntax = "proto3"; package v1; diff --git a/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1alpha1/api.proto b/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1alpha1/api.proto index 782ac714b6a..c78660b5eee 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1alpha1/api.proto +++ b/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1alpha1/api.proto @@ -1,4 +1,4 @@ -// To regenerate api.pb.go run hack/update-generated-pod-resources.sh +// To regenerate api.pb.go run `hack/update-codegen.sh protobindings` syntax = "proto3"; package v1alpha1; @@ -45,4 +45,4 @@ message ContainerResources { message ContainerDevices { string resource_name = 1; repeated string device_ids = 2; -} \ No newline at end of file +}