Skip to content

Commit 70f5e31

Browse files
gman0ntnn
authored andcommitted
UPSTREAM: <carry>: don't use --prefers-protobuf with client-gen
kcp doesn't implement protobuf codec yet, and so we need to disable it in the client code. This commit comments out --prefers-protobuf command line flag when invoking client-gen in update-codegen.sh scripts in various places. TODO: revert once kcp gains protobuf support. On-behalf-of: SAP [email protected] Signed-off-by: Robert Vasek <[email protected]>
1 parent df26ed0 commit 70f5e31

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

hack/update-codegen.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@ function codegen::clients() {
776776
|| true) \
777777
| xargs -0 rm -f
778778

779+
# kcp: TODO(gman0) re-add `--prefers-protobuf` once kcp-dev/{client-go,kcp} supports protobuf codec.
779780
client-gen \
780781
-v "${KUBE_VERBOSE}" \
781782
--go-header-file "${BOILERPLATE_FILENAME}" \
@@ -785,10 +786,10 @@ function codegen::clients() {
785786
--input-base="k8s.io/api" \
786787
--plural-exceptions "${PLURAL_EXCEPTIONS}" \
787788
--apply-configuration-package "${APPLYCONFIG_PKG}" \
788-
--prefers-protobuf \
789789
$(printf -- " --input %s" "${gv_dirs[@]}") \
790790
"$@"
791791

792+
792793
if [[ "${DBG_CODEGEN}" == 1 ]]; then
793794
kube::log::status "Generated client code"
794795
fi

staging/src/k8s.io/apiextensions-apiserver/hack/update-codegen.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ kube::codegen::gen_openapi \
4545
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \
4646
"${SCRIPT_ROOT}/pkg"
4747

48+
# kcp: TODO(gman0) re-add `--prefers-protobuf` once kcp-dev/{client-go,kcp} supports protobuf codec.
4849
kube::codegen::gen_client \
4950
--with-watch \
5051
--with-applyconfig \
5152
--output-dir "${SCRIPT_ROOT}/pkg/client" \
5253
--output-pkg "${THIS_PKG}/pkg/client" \
5354
--versioned-name "clientset" \
5455
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \
55-
--prefers-protobuf \
5656
"${SCRIPT_ROOT}/pkg/apis"

staging/src/k8s.io/kube-aggregator/hack/update-codegen.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ kube::codegen::gen_openapi \
4444
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \
4545
"${SCRIPT_ROOT}/pkg/apis"
4646

47+
# kcp: TODO(gman0) re-add `--prefers-protobuf` once kcp-dev/{client-go,kcp} supports protobuf codec.
4748
kube::codegen::gen_client \
4849
--with-watch \
4950
--output-dir "${SCRIPT_ROOT}/pkg/client" \
5051
--output-pkg "${THIS_PKG}/pkg/client" \
5152
--clientset-name "clientset_generated" \
5253
--versioned-name "clientset" \
5354
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \
54-
--prefers-protobuf \
5555
"${SCRIPT_ROOT}/pkg/apis"

staging/src/k8s.io/metrics/hack/update-codegen.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ kube::codegen::gen_helpers \
3232
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \
3333
"${SCRIPT_ROOT}/pkg/apis"
3434

35+
# kcp: TODO(gman0) re-add `--prefers-protobuf` once kcp-dev/{client-go,kcp} supports protobuf codec.
3536
kube::codegen::gen_client \
3637
--output-dir "${SCRIPT_ROOT}/pkg/client" \
3738
--output-pkg "${THIS_PKG}/pkg/client" \
3839
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \
39-
--prefers-protobuf \
4040
"${SCRIPT_ROOT}/pkg/apis"

0 commit comments

Comments
 (0)