Skip to content

Commit

Permalink
fix: update codegen
Browse files Browse the repository at this point in the history
Signed-off-by: David van der Spek <[email protected]>
  • Loading branch information
davidspek committed Dec 2, 2024
1 parent 6a25c78 commit 99ab5d5
Show file tree
Hide file tree
Showing 237 changed files with 77,341 additions and 78 deletions.
4 changes: 4 additions & 0 deletions multidimensional-pod-autoscaler/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ require (
k8s.io/apimachinery v0.31.0-alpha.2
k8s.io/autoscaler/vertical-pod-autoscaler v1.1.2
k8s.io/client-go v0.31.0-alpha.2
k8s.io/code-generator v0.31.0-alpha.2
k8s.io/component-base v0.31.0-alpha.2
k8s.io/klog/v2 v2.120.1
k8s.io/kubernetes v1.31.0-alpha.2
Expand Down Expand Up @@ -85,12 +86,14 @@ require (
go.uber.org/zap v1.26.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/oauth2 v0.20.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/tools v0.21.0 // indirect
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
Expand All @@ -106,6 +109,7 @@ require (
k8s.io/cloud-provider v0.0.0 // indirect
k8s.io/component-helpers v0.31.0-alpha.2 // indirect
k8s.io/controller-manager v0.31.0-alpha.2 // indirect
k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect
k8s.io/kms v0.31.0-alpha.2 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/kubelet v0.0.0 // indirect
Expand Down
6 changes: 6 additions & 0 deletions multidimensional-pod-autoscaler/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnL
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
Expand Down Expand Up @@ -314,12 +316,16 @@ k8s.io/client-go v0.31.0-alpha.2 h1:13UCBphjOLcqQ1ROBA+y9sr9Bmc/Ss1ypHQEDb6uKas=
k8s.io/client-go v0.31.0-alpha.2/go.mod h1:wF4N5QBYqOoXntvUsYd5eyfDLqskc/UNDyEF6WvaFIk=
k8s.io/cloud-provider v0.31.0-alpha.2 h1:sXMzLh8jqBcmwNGnTnkAUIrs9Mz/lX21fG1A9RXw+D0=
k8s.io/cloud-provider v0.31.0-alpha.2/go.mod h1:IA+MRR/s1GNSCiqfMG9KGgObJ1J1JxkLtpQqJKo5HUk=
k8s.io/code-generator v0.31.0-alpha.2 h1:ZgL/AgAXFbZ4P32Rrv2FFxQPU2MKTdNd4RTVAipCQlE=
k8s.io/code-generator v0.31.0-alpha.2/go.mod h1:4hS5z9BqvAr5Lup7NsSAh2iXug1I6KVB5x9bnQD1w8k=
k8s.io/component-base v0.31.0-alpha.2 h1:bAYhaSt++Mf7x0042QkeKJpzOuMq3KP7WGiLIM2hBcA=
k8s.io/component-base v0.31.0-alpha.2/go.mod h1:4RdlW5OL0oab6gWaGWjxIcgORwuiuO49gV2GSxJ/9io=
k8s.io/component-helpers v0.31.0-alpha.2 h1:hDHzUmS4PpG4sS1BmcI0AjIyiZ6TV4659WzPYFJt0dA=
k8s.io/component-helpers v0.31.0-alpha.2/go.mod h1:gZLke4d+k/ARRr+AlGhiUypYte9Z7x/gnjj31AM6tSc=
k8s.io/controller-manager v0.31.0-alpha.2 h1:D/Mov3/8XxTUpbDGzXPnFQ6/lVKPo62I881X80ZcLHg=
k8s.io/controller-manager v0.31.0-alpha.2/go.mod h1:2hczLv94BNLcQfkHOfCsTWM/SyjSPxGxJb5Ahki4tLs=
k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 h1:NGrVE502P0s0/1hudf8zjgwki1X/TByhmAoILTarmzo=
k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8=
k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kms v0.31.0-alpha.2 h1:HY6D1VuzxTqvQX1JH4jsPaj86a6MTN4AJJwDEVIPo7U=
Expand Down
25 changes: 25 additions & 0 deletions multidimensional-pod-autoscaler/hack/tools.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//go:build tools
// +build tools

/*
Copyright 2024 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.
*/

// Package tools is here, such that we can version dependencies that our helpers in the Makefile and hack/ directory
// use with the regular go.mod mechanism. They get downloaded with `go mod vendor` and scripts can directly reference
// the executables used e.g. for generating CRDs, clients and informers.
package tools

import _ "k8s.io/code-generator"
22 changes: 11 additions & 11 deletions multidimensional-pod-autoscaler/hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ set -o pipefail
SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/..
CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../../code-generator)}

# generate the code with:
# --output-base because this script should also be able to run inside the vendor dir of
# k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
# instead of the $GOPATH directly. For normal projects this can be dropped.
${CODEGEN_PKG}/generate-groups.sh all \
k8s.io/autoscaler/multidimensional-pod-autoscaler/pkg/client k8s.io/autoscaler/multidimensional-pod-autoscaler/pkg/apis \
"autoscaling.k8s.io:v1alpha1" \
--output-base "$(dirname ${BASH_SOURCE})/../../../.." \
--go-header-file "${SCRIPT_ROOT}"/hack/boilerplate.go.txt
source "${CODEGEN_PKG}/kube_codegen.sh"

# To use your own boilerplate text append:
# --go-header-file ${SCRIPT_ROOT}/hack/custom-boilerplate.go.txt
kube::codegen::gen_helpers \
"$(dirname ${BASH_SOURCE})/../pkg/apis" \
--boilerplate "${SCRIPT_ROOT}"/hack/boilerplate.go.txt

kube::codegen::gen_client \
"$(dirname ${BASH_SOURCE})/../pkg/apis" \
--output-pkg k8s.io/autoscaler/multidimensional-pod-autoscaler/pkg/client \
--output-dir "$(dirname ${BASH_SOURCE})/../pkg/client" \
--boilerplate "${SCRIPT_ROOT}"/hack/boilerplate.go.txt \
--with-watch
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ var SchemeGroupVersion = schema.GroupVersion{
}

var (
SchemeBuilder runtime.SchemeBuilder
SchemeBuilder runtime.SchemeBuilder
localSchemeBuilder = &SchemeBuilder
AddToScheme = SchemeBuilder.AddToScheme
AddToScheme = SchemeBuilder.AddToScheme
)

// Resource takes an unqualified resource and returns a Group qualified GroupResource
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 99ab5d5

Please sign in to comment.